update-exchange-rates

Update exchange rates

npm install update-exchange-rates
1 downloads in the last week
2 downloads in the last month

This is a little tool to update the currency exchange rates using the open source exchange rates service found at http://josscrowcroft.github.com/open-exchange-rates/.

Usage

npm install
chmod +x bin/update_rates
bin/update_rates rates.json

This will drop the conversion rates into rates.json

Specifying currency codes

Via the cmd line

To specify the currencies to convert from the cmd line, use the -c parameter

bin/update_rates -c USD,CAD,EUR rates.json

Via a file

To specify the currencies to convert from a file, use the -f parameter

bin/update_rates -f currencies.json rates.json

where currencies.json is either an array of currency codes

["USD", "CAD", "EUR"]

or an object with currency codes as keys

{"USD": "$", "CAD": "$", "EUR": "€"}
npm loves you