cURRENCY cONvERtER
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Mirko Di 2492720e6c
Replaced old "ccvt.desktop": it was the wrong file
3 weeks ago
lib Added country flags 3 weeks ago
pix Changed screenshot 3 weeks ago
COPYING Initial commit 3 weeks ago
Makefile Initial commit 3 weeks ago
README.org Removed copy-pasted "you can grab the latest binary [...]" line 3 weeks ago
ccvt-gui.c Used sprintf() instead of snprintf() 3 weeks ago
ccvt.c Initial commit 3 weeks ago
ccvt.desktop Replaced old "ccvt.desktop": it was the wrong file 3 weeks ago
install.sh Replaced old "ccvt.desktop": it was the wrong file 3 weeks ago
makefile.mk Initial commit 3 weeks ago
options.h Added country flags 3 weeks ago
update-eRates.sh Initial commit 3 weeks ago

README.org

cURRENCY cONvERtER (ccvt)

Copyright (C) 2023 mirk0dex <mirkodi.eu>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Flag icons: Copyright (c) 2013 Panayiotis Lipiridis

ccvt

ccvt is a cURRENCY cONvERtER that converts values from one currency to another. It's available both as a CLI and GUI program.

Running dependencies

  • a computer,
  • curl (for fetching the latest exchange rates [/optional/]),
  • jq (same as above),
  • any UNIX-like OS.

Building dependencies

  • glibc (not based enough to use musl yet),
  • Xlib (yeah, yeah, I know…),
  • Nuklear (very based indeed).

Installation

Clone the repo, cd into its directory, compile and copy to /usr/local/bin/ and you're good to go!

If you're in a terminal emulator, run:

git clone https://git.mirkodi.eu/mirk0dex/ccvt # clone the repository
cd ccvt                                        # cd into its dir
chmod +x ./install.sh                          # make install.sh executable
./install.sh # this MUST be run in a terminal  # run install.sh

Building manually

Just use the Makefile, after installing the required dependencies.

make

Usage

CLI

ccvt <value to convert> <INITIAL CURRENCY> <FINAL CURRENCY>

UPPERCASE three-letter ISO 4217 currency identifiers must be given in place of <FINAL CURRENCY> or <INITIAL CURRENCY>.

To list all available currencies' identifiers, run ccvt with no arguments.

GUI

/mirk0dex/ccvt/src/branch/main/pix/gui-screenshot.png

ccvt also offers a simple GUI, built using Nuklear. You can access it by looking for "cURRENCY cONvERtER" in your application menu. Alternatively, you can open a terminal window and use the command ccvt-gui.

This kind of interface has some cons to it: command line interfaces are generally quicker and more straight-forward.

If you use the "Search" function, please note that it is case-sensitive, and you must write in ALL CAPS.

Fetching new exchange rates

ccvt gets its exchange rates from a text file stored in $HOME/.local/share/ccvt/eRates.txt. This file is managed by a script called update-eRates.sh.

It uses https://api.exchangerate.host/latest, so be aware that running this script will ping this website. (The script is ran automatically when you install the program with install.sh!).

Every once in a while, if you're fine with that, be sure to run the above-mentioned script to make sure currency conversions are correct.

If you use the graphical interface, you can use the "Update exch. r.s" button to do so.