Skip to content

johnwayodi/currency_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

currency_cli

Ensure Rust is installed

Check currency rates against USD, convert between currencies, and search country info.

Commands

Show help

./currency_cli --help

List currency rates

Run the CLI and enter currency codes separated by commas:

./currency_cli

Example Response:

Enter country codes separated by commas (e.g., 'KES,UGX' for Kenyan Shilling and Ugandan Shilling):
KES,UGX
1 USD = 128.5 KES
1 USD = 3800.0 UGX

Convert value from one currency to another

./currency_cli --convert kes-ugx 1000

Example Response:

1000 KES = 29600 UGX

Search for country info

Search uses data/country-codes.csv embedded into the binary

Credits to datasets/country-codes

./currency_cli --find-country ken

Example Response:

[
  {
    "official_name_en": "Kenya",
    "ISO3166_1_alpha_2": "KE",
    "ISO4217_currency_country_name": "KENYA",
    "ISO4217_currency_alphabetic_code": "KES",
    "region_name": "Africa",
    "wikidata_id": "Q114",
    "is_independent": "Yes",
    "dial": "254"
  }
]

Build executable

Rust

chmod +x build-rust.sh && bash build-rust.sh

About

cli app to check/convert exchange rates

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published