sometime back I saw a calculator with currency conversion built-in with an option to update to current rates if so desired. Does anybody know what I'm talking about ? Saw it in debian.
4 Answers
Qalculate
Install the qalculate-gtk package:
Qalculate! is small and simple to use but with much power and versatility underneath. Features include customizable functions, units, arbitrary precision, plotting, and a graphical interface that uses a one-line fault-tolerant expression entry (although it supports optional traditional buttons).
apt install qalculate-gtk
start the application , you will see the following message:
You need to download exchange rates to be able to convert
between different currencies. You can later get current
exchange rates by selecting "Update Exchange Rates" under the File menu.
Do you want to fetch exchange rates now from the Internet?
Hit Yes , from the menu select Units then currency .
gnome-calculator
apt install gnome-calculator
Description
The GNOME calculator is a powerful graphical calculator with financial, logical and scientific modes. It uses a multiple precision package to do its arithmetic to give a high degree of accuracy.
From the Advanced Mode choose Financial Mode. Also the keyboard mode allow you to convert currency.
-
actually this is the package I was looking for, unfortunately in debian the package is far too old, the newest version has the thing I want the most. Huge improvements in the basket of currencies.shirish– shirish2017-12-12 05:00:47 +00:00Commented Dec 12, 2017 at 5:00
-
@shirish Please see my update.GAD3R– GAD3R2017-12-12 09:05:33 +00:00Commented Dec 12, 2017 at 9:05
-
I saw that, alas it seems you have to get the rates manually in, there is no way for it to get rates from central bank or money exchange markets and give you current rates which is what the newer and newest versions of qalculate-gtk do (along with more currencies added to it )shirish– shirish2017-12-14 07:12:02 +00:00Commented Dec 14, 2017 at 7:12
You can use the units package which works for currencies as well as a ton of other units.
The 'units' program converts quantities expressed in various systems of measurement to their equivalents in other systems of measurement.
sudo apt install units
To convert 1 € to US Dollars
units "1 EUR" USD
> * 1.132161
> / 0.88326657
For a more compact command and also output
units --terse 1EUR USD
> 1.132161
To update the exchange rates:
sudo units_cur
1) Keurocalc?
KEurocalc is a universal currency converter and calculator. It downloads latest exchange rates directly from the European Central Bank and Time Genie.
2) Or you can just use Chromium browser. e.g. Input into the address bar
convert 500 usd to gbp
-
The only problem with kerocalc is that it takes Euro as the default currency, I wish there was a way to change that but seems there isn't.shirish– shirish2017-12-12 04:59:36 +00:00Commented Dec 12, 2017 at 4:59
From the command line:
#!/bin/sh
# from Ambrevar https://bbs.archlinux.org/viewtopic.php?pid=1568235#p1568235
if [ $# -ne 3 ] || [ "$1" = "-h" ]; then
cat <<EOF
Usage: ${0##*/} VALUE IN-CURRENCY OUT-CURRENCY
Convert VALUE from IN-CURRENCY to OUT-CURRENCY.
CURRENCY is a 3-letters code like EUR, SEK, USD, etc.
EOF
exit
fi
curl -sA "Mozilla/5.0" "https://finance.google.com/finance/converter?a=$1&from=$2&to=$3" | \
awk -F '<|>' '/result/ {print substr($5,1,length($5)-6)}'
-
No longer works:
your computer or network may be sending automated querieseven though I only tried onceuser640916– user6409162019-07-29 19:43:08 +00:00Commented Jul 29, 2019 at 19:43
galculatoryou can configure constants and functions but nothing specific to currency conversion.