Added a toml-based config file which allows changing the prompt and configuring how currency info gets downloaded.
Use proper directories (hopefully). Fixes #78.
Added eyre for pretty printing of error messages. The CLI now uses it instead of String, which is an improvement. Hopefully I can eventually use rich error objects for the rest of Rink.
Default config
[rink]
prompt = "> "
[currency]
enabled = true
endpoint = "https://rinkcalc.app/data/currency.json" # Allows pointing to an alternate rink-web instance.
timeout = "2s" # Accepts common suffixes like ms, s, h, d, y.
cache_duration = "1h"
eyre
for pretty printing of error messages. The CLI now uses it instead ofString
, which is an improvement. Hopefully I can eventually use rich error objects for the rest of Rink.Default config
$XDG_CONFIG_HOME/rink/config.toml
/home/tiffany/.config/rink/config.toml
{FOLDERID_RoamingAppData}
C:\Users\Tiffany\AppData\Roaming\rink\config.toml
$HOME/Library/Application Support
/Users/Tiffany/Library/Application Support