AminetAminet
Search:
83849 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/rexx/Convert.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Simple command line currency conversion
Author:ahoffman.clear.net.nz at gmail.com (Anthony Hoffman)
Uploader:ahoffman clear net nz gmail com (Anthony Hoffman)
Type:util/rexx
Version:1.0
Replaces:util/rexx/Convert.lha
Requires:Amiga compatible system with TCP/IP Stack
Architecture:m68k-amigaos
Distribution:Aminet
Date:2019-02-27
Download:http://aminet.net/util/rexx/Convert.lha - View contents
Readme:http://aminet.net/util/rexx/Convert.readme
Downloads:1239

------------------------------------------------------

Arexx script to convert a value of one currency type to another.

Based on Convert 0.6 by Michael Trebilcock which used xe.com to
perform the currency exchange.  Due to changes to xe.com, v0.6
no longer works.  The script now uses a web service from
free.currencyconverterapi.com to source the exchange rate and
the currency value calculation is now performed within the script.

Requires an Amiga compatible system running a TCP/IP stack,
e.g. Miami, AmiTCP, Genesis.

Created with and tested on A4000T/68060 AmigaOS3.9 and MiamiDX.

Both an Arexx script and a Rexecute compiled version of the script
for 68k AmigaOS is provided.  This 68k executable causes a
GrimReaper on OS4.x.  The Arexx script operates correctly on OS4.x
and should work on other Amiga-like systems with full ARexx
support, though this is untested.


Usage for Convert.rexx:
RX Convert.rexx <Amount> <From> <To>
e.g. RX Convert.rexx 1 AUD USD


Usage for Convert:
Convert "<Amount> <From> <To>"
e.g. Convert "1 AUD USD"

The compiled version of Convert must be run from the CLI (command 
line) and requires quotation marks around the arguments, which is
something to do with Rexecute.  Floating point numbers are accepted
by both scripts.
e.g.
RX Convert.rexx 1.75 AUD USD
Convert "1.75 AUD USD"


See https://free.currencyconverterapi.com/ for a full list of
currency codes.  Requires a CSS capable web browser.



IMPORTANT:
From February 2019, free.currencyconverterapi.com now requires a
freely available personal key to access the API.

To get your free personal key:
1. Using a a CSS capable web browser, visit:
   https://free.currencyconverterapi.com/free-api-key

2. Enter your Email address and check the "I'm not a robot" box

3. In the Email you receive, click on the verify link to activate
   the personal key

4. In the same Email you'll see a line similar to:
   Here's your free API key: 12345678901234abcdef

5. Copy the 20-digit key, make sure you only copy the key and no
   additional characters or spaces

6. From the Amiga command line (CLI) save your personal key to ENVARC
   by entering:

   setenv CC-APIkey SAVE <API key code>

   e.g.
   setenv CC-APIkey SAVE 12345678901234abcdef

7. Convert and Convert.rexx will now automatically read your API key


------------------------------------------------------


History:
v0.6 2002 Michael Trebilcock
    Final Aminet release of Convert using xe.com.

v0.7 24/4/2010 Anthony Hoffman
    Re-wrote script to source currency conversion from finance.yahoo.com.

v0.8 1/2/2014 Anthony Hoffman
    The Host: header field is now sent in the server request due to a
    change on the finance.yahoo.com server which resulted in a return
    of error 404 unless the Host: header field is sent as specified
    in RFC2616-sec5.

    An invalid currency type of UKP is now converted to GBP.

v0.9 12/11/2017 Anthony Hoffman
    The finance.yahoo.com API was discontinued on 6th November 2017,
    changed script to use the free.currencyconverterapi.com API instead.

v1.0 27/2/2019 Anthony Hoffman
    From February 2019, free.currencyconverterapi.com now
    requires a free personal key to access the API.
    See instructions above for how to obtain your free personal key
    and how to use it.



Contents of util/rexx/Convert.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                 9017   15632  57.7% -lh5- d182 Feb 27 19:34 Convert/Convert
[unknown]                  397     831  47.8% -lh5- 3d35 Nov 12  2017 Convert/Convert.info
[unknown]                 1610    3658  44.0% -lh5- 0807 Feb 27 20:35 Convert/Convert.readme
[unknown]                 1634    4172  39.2% -lh5- 2abc Feb 27 19:32 Convert/Convert.rexx
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total         4 files   12658   24293  52.1%            Feb 27 08:21

Aminet © 1992-2022 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>