mirror of
https://github.com/lov3b/ecb-rates.git
synced 2025-12-19 19:00:39 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 61deca69c6 | |||
|
|
292c9d4f34 | ||
| 0f921e978e | |||
| 3fce153c1c | |||
| 416233afde | |||
| f2f27a25b6 |
897
Cargo.lock
generated
897
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
41
Cargo.toml
41
Cargo.toml
@@ -1,40 +1,37 @@
|
||||
[package]
|
||||
name = "ecb-rates"
|
||||
description = "Query exchange rates from the European Central Bank (ECB)"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
edition = "2021"
|
||||
authors = ["Love Billenius <lovebillenius@disroot.org>"]
|
||||
license = "Zlib"
|
||||
license-file = "LICENSE"
|
||||
keywords = [
|
||||
"ECB",
|
||||
"European Central Bank",
|
||||
"Bank",
|
||||
"Central Bank",
|
||||
"Central",
|
||||
"exchange",
|
||||
"rates",
|
||||
"eur",
|
||||
"sek",
|
||||
"usd",
|
||||
"nok",
|
||||
"gbp",
|
||||
"pln",
|
||||
"dkk",
|
||||
"czk",
|
||||
"isk",
|
||||
"chf",
|
||||
]
|
||||
repository = "https://github.com/lov3b/ecb-rates"
|
||||
rust-version = "1.83"
|
||||
categories = ["finance", "command-line-utilities"]
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
|
||||
[[bin]]
|
||||
name = "ecb-rates"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.95"
|
||||
chrono = { version = "0.4.39", features = ["serde"] }
|
||||
clap = { version = "4.5.23", features = ["derive"] }
|
||||
colored = "3.0.0"
|
||||
quick-xml = { version = "0.37.2", features = ["async-tokio", "tokio"] }
|
||||
reqwest = "0.12.12"
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
serde_json = "1.0.134"
|
||||
tokio = { version = "1.42.0", features = ["macros"] }
|
||||
anyhow = "1.0"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
colored = "3.0"
|
||||
quick-xml = { version = "0.38", features = ["async-tokio", "tokio"] }
|
||||
reqwest = "0.12"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tokio = { version = "1.48", features = ["macros"] }
|
||||
|
||||
16
README.md
16
README.md
@@ -7,7 +7,7 @@
|
||||
alt="European Central Bank Logo"
|
||||
align="left"
|
||||
/>
|
||||
A CLI utility to fetch exchange reates from the European Central Bank.
|
||||
A CLI utility to fetch exchange rates from the European Central Bank.
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
@@ -19,12 +19,18 @@
|
||||
|
||||
## Install
|
||||
|
||||
### Binary
|
||||
|
||||
If you're on Debian Linux, then just go over to the releases, and install the latest _.deb_ package with `dpkg`
|
||||
|
||||
### Source
|
||||
|
||||
First, make sure that you have the rust toolchain installed. If not, then go to [rustup](https://rustup.rs) to install it.
|
||||
|
||||
Now, run the following cargo command:
|
||||
|
||||
```sh
|
||||
cargo install --git https://github.com/lov3b/ecb-rates.git
|
||||
cargo install ecb-rates
|
||||
```
|
||||
|
||||
Congratulations! Now the cli binary `ecb-rates` will be in your cargo bin folder.
|
||||
@@ -37,7 +43,7 @@ It will fetch any of the following api nodes, and reduce them for you.
|
||||
|
||||
- Last available day.
|
||||
- Last 90 days
|
||||
- Since the dawn of the *EUR*
|
||||
- Since the dawn of the _EUR_
|
||||
|
||||
#### Display select currencies
|
||||
|
||||
@@ -53,11 +59,11 @@ It features an extensive cache, which will [calculate hollidays](src/holiday.rs)
|
||||
|
||||
Change the rates for the perspective of any currency with the `--perspective` or `-p` flag.
|
||||
|
||||
Flip it from `EUR to ALL` to `ALL to EUR` with the `--invert` or `-i` flag. It will work as expected with the *perspective* option.
|
||||
Flip it from `EUR to ALL` to `ALL to EUR` with the `--invert` or `-i` flag. It will work as expected with the _perspective_ option.
|
||||
|
||||
#### Fast
|
||||
|
||||
It wouldn't be a rust project without being *BLAZINGLY FAST*! When the cache is valid a single day will on my computer be shown in 3 ms. When the cache isn't being used it will be ~90ms. The cache speed will largely depend on your drive, the latter will depend on your network speed. Both options are fast enought to be in a `.bashrc` or `.zshrc`
|
||||
It wouldn't be a rust project without being _BLAZINGLY FAST_! When the cache is valid a single day will on my computer be shown in 3 ms. When the cache isn't being used it will be ~90ms. The cache speed will largely depend on your drive, the latter will depend on your network speed. Both options are fast enought to be in a `.bashrc` or `.zshrc`
|
||||
|
||||
### Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user