curry

command module
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

README

curry

curry is a currency conversion tool. It uses the exchangerates.io historical API.

Real-time rates are not available on the free plan, but historical ones are, so yesterday's rates are used for conversions.

Installation

go install crdx.org/curry@latest

Configuration

Place a valid exchangerates.io API key in ~/.config/curry/api_key.

CLI

Usage:
    curry raw
    curry ls
    curry clean
    curry [options] <value>

Convert currencies.

Commands:
    raw      Print raw json
    ls       List available currencies
    clean    Clean cache

Options:
    -f, --from TYPE    From this currency [default: GBP]
    -t, --to TYPE      To this currency [default: GBP]
    -q, --quiet        Show only the value
    -C, --no-color     Disable colours
    -h, --help         Show help

Examples

Convert 10 USD to GBP.

curry -f USD -t GBP 10

View a list of currencies.

curry list

Commands

Convert

Use -f/--from and -t/--to to specify source and target currency identifiers. Use -q/--quiet to output only the value.

Raw

Show the raw JSON returned from the API.

List

List available currency identifiers.

Clear

Delete the current rates cache (see below).

Cache

The first call will fetch yesterday's rates and cache them locally, using the cache for any further calls.

Cached rates are stored at ~/.cache/curry/<YYYY-mm-dd>.json.

Contributions

Open an issue or send a pull request.

Licence

GPLv3.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL