5

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.

2

4 Answers 4

4

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.

3
  • 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. Commented Dec 12, 2017 at 5:00
  • @shirish Please see my update. Commented 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 ) Commented Dec 14, 2017 at 7:12
4

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
2

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

1
  • 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. Commented Dec 12, 2017 at 4:59
1

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)}'
1
  • No longer works: your computer or network may be sending automated queries even though I only tried once Commented Jul 29, 2019 at 19:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.