Skip to content

Demonstrandum/Coins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coins

A simple live terminal currency exchange rate converter in Ruby

The currencies are retrieved from fixer.io which is a "Foreign exchange rates and currency conversion API" which is a JSON API published by the 'European Central Bank'

The rates are updated daily around 4 PM CET

Installation

Install the command line application with ruby-gems through rubygems.org by typing:

gem install coins

you might need to use sudo, if the command fails type sudo !-1

If you prefer to build from source:

git clone https://github.com/Demonstrandum/Coins.git && cd Coins
gem build coins.gemspec
gem install coins-*.gem

Usage

This application is meant purely as a terminal tool.

To convert between an amount of money between currencies, simply put: from [amount] [currency] to [other currency] for example:

coins from 6 GBP to NOK
coins to NOK from 6 GBP

either will work just the same.

To print all known currencies

coins rates

This will default to showing the currencies against the US dollar (USD). To change this simply add the word against CUR where CUR is the currency to check against, e.g. GBP (Great British Pound), or use the word base instead, anywhere in the command arguments.

For example:

coins rates against GBP
coins base GBP rates

both will work.

To print a single rate, write rate and the currency, (still defaults to USD if no other currency is specified in either base or against)

coins against EUR rate NOK
coins rate NOK base EUR

About

A simple live terminal currency exchange rate converter in Ruby

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages