Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/npupko/exchanger
Rust-based exchange CLI tool to convert USD to BYN from "НБРБ" rates
https://github.com/npupko/exchanger
Last synced: about 6 hours ago
JSON representation
Rust-based exchange CLI tool to convert USD to BYN from "НБРБ" rates
- Host: GitHub
- URL: https://github.com/npupko/exchanger
- Owner: npupko
- Created: 2023-02-09T17:15:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-27T15:56:32.000Z (about 1 year ago)
- Last Synced: 2023-12-27T16:43:56.606Z (about 1 year ago)
- Language: Rust
- Size: 98.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exchanger
Exchanger is a Rust-based command line utility that allows users to easily convert currencies. It retrieves currency rates from the National Bank of Belarus and calculates the exchange rate from US Dollars (USD) to Belarusian Rubles (BYN).
![Demo](/assets/demo.png)
## Installation
To install Exchanger, you will need to have the following installed on your machine:
- [Rust](https://www.rust-lang.org/tools/install)
- [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)Simply clone the repository and build the program using `cargo`:
```
git clone https://github.com/npupko/exchanger.git
cd exchanger
cargo build --release
```## Usage
To use Exchanger, simply run the program and specify the date for rate to get
```
./exchanger --date
```
You can also specify the the amount of USD you would like to convert to BYN:```
./exchanger --date --amount
./exchanger --date 2022-12-31 --amount 2000# USD rate for 2022-12-31 is 2.7364
# You received (in BYN): 5472.8000
```If you do not specify the date, the program will use the today's date:
```
./exchanger --amount 2000
USD rate for today (2023-12-27) is 3.1962
You received (in BYN): 6392.4000
```## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)