summaryrefslogtreecommitdiff
path: root/README
blob: 1027783c6d25b9fcfa5e14b4f4ded0832bf1c909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Coinfetch
=========

See [INSTALL](INSTALL) for installation instructions.

Using `coinfetch`
-----------------

coinfetch takes two arguments from the command line, and returns a conversion 
factor.

The arguments are the three-letter identifiers of various currencies.

Many (but not all) pairs of coins can be used.

Example: `$ coinfetch usd btc`

The above example will return the amount of Bitcoin that can currently be
bought with one United States dollar.

If the coins are reversed (e.g. `$ coinfetch btc usd`), the amount of United
States dollars that can currently be bought with one Bitcoin will be returned.

As of version 2.x, you may optionally add a third argument before the first
currency in order to multiply that amount.

Example: `$ coinfetch 1000 ltc usd`

The above example will return the value of 1000 LTC in USD.

As of version 4.x, you will be able to use `coinfetch` with many ticker APIs
with the `-a` option.

Example: `$ coinfetch -a bter usd doge`

The above example will be the same as calling `coinfetch usd doge` in version
2.x, which used the BTer API. The default API is BTC-E.

For help using `coinfetch` and for a list of options, use `coinfetch --help`.

Installing Plugins
------------------

Plugins are read from a number of directories in a particular
order. Directories lower on this list with override those higher on the list,
since duplicate entries will be registered over one another in the load
order. Currently, these are:

- `cfetch/plugins` located in this source repository and installed to the
system after installation.
- `/usr/share/coinfetch/plugins` on Unix-like operating systems.
- `/usr/local/share/coinfetch/plugins` for user-installed plugins on Unix-like
operating systems.
- The `.coinfetch/plugins` directory in the user's home directory.

Any file ending in `.py` will be loaded using Python standard `import`
logic. No functions will be executed by `coinfetch` directly. You must execute
them at the global level if needed. See the default plugins in `cfetch/plugins`
for examples of simple working plugins.

**CAUTION**: To allow plugin developers to use unique solutions when
  implementing their plugins, plugin code is not checked for sanity or security
  before it is executed. Only install plugins from developers you trust to not
  damage or corrupt system or personal files or compromise personal data.

Note
----

Version 5.x changes the program from a static API/CLI to a plugin-based system
with an API for external applications as well as the familiar CLI. The
advantage of this new design is to allow hackers to add new APIs to Coinfetch
without having to submit upstream requests. Officially-supported ticker APIs
will stay in this repository to keep things easy for existing Coinfetch users.

BTer's ticker (as of this update) does not seem to be updating often enough to
have accurate data. Version 4.1.x adds the CryptoCoin Charts (ccc) API which
appears to have accurate data. This API is slightly more limited (it doesn't
have as many values, and the formatting does not follow the one used by BTer
and BTC-E; however, it does have support for Dogecoin which is favored by
Delwink. If you want a more accurate calculation for Dogecoin and other
altcoins, we recommend the ccc API.

Note that the ccc API is new to coinfetch and does not match the formula
expected by the original code. Expect some bugs when using it: the numbers
should be accurate, but it may error out where the other APIs do not. Please
report bugs to [Delwink's bug tracking system][2].

Licensing
---------

This script is [free software](http://gnu.org/philosophy/free-sw.html),
licensed under the terms of version 3 of the GNU Affero General Public
License. See [COPYING](COPYING) for more information.

[1]: mailto:contribute@delwink.com
[2]: http://bugs.delwink.com/index.php?project=4&do=index