6 Commits

Author SHA1 Message Date
61deca69c6 Update dependencies, fix a spelling mistake, set license field and bump package-version 2025-12-17 11:46:17 +01:00
Love
292c9d4f34 Merge pull request #2 from lov3b/feature/lto
enable LTO for release-builds
2025-12-17 11:32:04 +01:00
0f921e978e enable LTO 2025-12-17 11:29:55 +01:00
3fce153c1c update for crates.io 2025-01-09 17:29:35 +01:00
416233afde For crates.io 2025-01-09 17:27:48 +01:00
f2f27a25b6 Instructions for dpkg 2025-01-09 17:16:12 +01:00
3 changed files with 522 additions and 432 deletions

897
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,40 +1,37 @@
[package] [package]
name = "ecb-rates" name = "ecb-rates"
description = "Query exchange rates from the European Central Bank (ECB)" description = "Query exchange rates from the European Central Bank (ECB)"
version = "1.0.0" version = "1.0.1"
edition = "2021" edition = "2021"
authors = ["Love Billenius <lovebillenius@disroot.org>"] authors = ["Love Billenius <lovebillenius@disroot.org>"]
license = "Zlib"
license-file = "LICENSE" license-file = "LICENSE"
keywords = [ keywords = [
"ECB", "ECB",
"European Central Bank",
"Bank", "Bank",
"Central Bank", "Central",
"exchange", "exchange",
"rates", "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]] [[bin]]
name = "ecb-rates" name = "ecb-rates"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
anyhow = "1.0.95" anyhow = "1.0"
chrono = { version = "0.4.39", features = ["serde"] } chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4.5.23", features = ["derive"] } clap = { version = "4.5", features = ["derive"] }
colored = "3.0.0" colored = "3.0"
quick-xml = { version = "0.37.2", features = ["async-tokio", "tokio"] } quick-xml = { version = "0.38", features = ["async-tokio", "tokio"] }
reqwest = "0.12.12" reqwest = "0.12"
serde = { version = "1.0.217", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.134" serde_json = "1.0"
tokio = { version = "1.42.0", features = ["macros"] } tokio = { version = "1.48", features = ["macros"] }

View File

@@ -7,7 +7,7 @@
alt="European Central Bank Logo" alt="European Central Bank Logo"
align="left" 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 /> <br />
<br /> <br />
@@ -19,12 +19,18 @@
## Install ## 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. 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: Now, run the following cargo command:
```sh ```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. 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 available day.
- Last 90 days - Last 90 days
- Since the dawn of the *EUR* - Since the dawn of the _EUR_
#### Display select currencies #### 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. 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 #### 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 ### Examples