/usr/lib/surfraw/currency is in surfraw 2.2.9-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | #!/bin/sh
# $Id$
# elvis: currency -- Convert currencies with the Universal Currency Converter (www.xe.net/ucc)
. surfraw || exit 1
list_currency_symbols () {
cat <<EOT
Symbol Country and Currency
AFA Afghanistan, Afghani
ALL Albania, Lek
DZD Algeria, Dinar
USD America (United States), Dollar
USD American Samoa, United States Dollar
EUR Andorra, Euro
AOA Angola, Kwanza
XCD Anguilla, East Caribbean Dollar
XCD Antigua and Barbuda, East Caribbean Dollar
ARS Argentina, Peso
AMD Armenia, Dram
AWG Aruba, Guilder
AUD Ashmore and Cartier Islands, Australia Dollar
AUD Australia, Dollar
EUR Austria, Euro
ATS Austria, Schilling [obsolete]
AZM Azerbaijan, Manat
EUR Azores, Euro
BSD Bahamas, Dollar
BHD Bahrain, Dinar
BBD Bajan (Barbados), Dollar
EUR Balearic Islands, Euro
BDT Bangladesh, Taka
BBD Barbados, Dollar
BYR Belarus, Ruble
EUR Belgium, Euro
BEF Belgium, Franc [obsolete]
BZD Belize, Dollar
XOF Benin, CFA Franc BCEAO
BMD Bermuda, Dollar
INR Bhutan, India Rupee
BTN Bhutan, Ngultrum
BOB Bolivia, Boliviano
ANG Bonaire, Netherlands Antilles Guilder
BAM Bosnia and Herzegovina, Convertible Marka
BWP Botswana, Pula
BRL Brazil, Real
GBP Britain (United Kingdom), Pound
GBP British Indian Ocean Territory, United Kingdom Pound
USD British Indian Ocean Territory, United States Dollar
USD British Virgin Islands, United States Dollar
BND Brunei, Dollar
SGD Brunei, Singapore Dollar
BGN Bulgaria, Lev
XOF Burkina Faso, CFA Franc BCEAO
MMK Burma (Myanmar), Kyat
BIF Burundi, Franc
KHR Cambodia, Riel
XAF Cameroon, CFA Franc BEAC
CAD Canada, Dollar
EUR Canary Islands, Euro
CVE Cape Verde, Escudo
KYD Cayman Islands, Dollar
XAF Central African Republic, CFA Franc BEAC
XAF CFA Communauté Financière Africaine BEAC Franc
XOF CFA Communauté Financière Africaine BCEAO Franc
XAF Chad, CFA Franc BEAC
CLP Chile, Peso
CNY China, Yuan Renminbi
AUD Christmas Island, Australia Dollar
AUD Cocos (Keeling Islands, Australia Dollar
COP Colombia, Peso
XAF Communauté Financière Africaine BEAC Franc
XOF Communauté Financière Africaine BCEAO Franc
KMF Comoros, Franc
XPF Comptoirs Français du Pacifique Franc
XAF Congo/Brazzaville, CFA Franc BEAC
CDF Congo/Kinshasa, Franc
NZD Cook Islands, New Zealand Dollar
AUD Coral Sea Islands, Australia Dollar
CRC Costa Rica, Colon
XOF Côte d'Ivoire, CFA Franc BCEAO
HRK Croatia, Kuna
CUC Cuba, Convertible Peso
CUP Cuba, Peso
ANG Curaço, Netherlands Antilles Guilder
CYP Cyprus, Pound
CZK Czech Republic, Koruna
DKK Denmark, Krone
DJF Djibouti, Franc
XCD Dominica, East Caribbean Dollar
DOP Dominican Republic, Peso
EUR Dutch (Netherlands), Euro
NLG Dutch (Netherlands), Guilder [obsolete]
XCD East Caribbean Dollar
USD East Timor, United States Dollar
USD Ecuador, United States Dollar
EGP Egypt, Pound
SVC El Salvador, Colon
GBP England (United Kingdom), Pound
XAF Equatorial Guinea, CFA Franc BEAC
ERN Eritrea, Nakfa
EEK Estonia, Kroon
ETB Ethiopia, Birr
EUR Euro
EUR Europa Island, Euro
FKP Falkland Islands, Pound
DKK Faroe Islands, Denmark Krone
FJD Fiji, Dollar
EUR Finland, Euro
FIM Finland, Markka [obsolete]
EUR France, Euro
FRF France, Franc [obsolete]
EUR French Guiana, Euro
XPF French Polynesia, Comptoirs Français du Pacifique Franc
EUR French Polynesia, Euro
EUR French Southern and Antarctic Lands, Euro
XAF Gabon, CFA Franc BEAC
GMD Gambia, Dalasi
ILS Gaza Strip, Israel New Shekel
GEL Georgia, Lari
DEM Germany, Deutsche Mark [obsolete]
EUR Germany, Euro
GHC Ghana, Cedi
GIP Gibraltar, Pound
XAU Gold Ounce
GBP Great Britain (United Kingdom), Pound
EUR Greece, Euro
GRD Greece, Drachma [obsolete]
DKK Greenland, Denmark Krone
XCD Grenada, East Caribbean Dollar
EUR Guadeloupe, Euro
USD Guam, United States Dollar
GTQ Guatemala, Quetzal
GGP Guernsey, Pound
GNF Guinea, Franc
XOF Guinea-Bissau, CFA Franc BCEAO
GYD Guyana, Dollar
HTG Haiti, Gourde
EUR Holland (Netherlands), Euro
NLG Holland (Netherlands), Guilder [obsolete]
EUR Holy See (Vatican City), Euro
VAL Holy See (Vatican City), Lira [obsolete]
HNL Honduras, Lempira
HKD Hong Kong, Dollar
HUF Hungary, Forint
ISK Iceland, Krona
INR India, Rupee
IDR Indonesia, Rupiah
XDR International Monetary Fund Special Drawing Right
IRR Iran, Rial
IQD Iraq, Dinar
EUR Ireland, Euro
IEP Ireland, Pound [obsolete]
FKP Islas Malvinas (Falkland Islands), Pound
IMP Isle of Man, Pound
ILS Israel, New Shekel
EUR Italy, Euro
ITL Italy, Lira [obsolete]
XOF Ivory Coast (Côte d'Ivoire), CFA Franc BCEAO
JMD Jamaica, Dollar
JPY Japan, Yen
JEP Jersey, Pound
USD Johnson, United States Dollar
JOD Jordan, Dinar
EUR Juan de Nova, Euro
KZT Kazakhstan, Tenge
KES Kenya, Shilling
AUD Kiribati, Australia Dollar
KWD Kuwait, Dinar
KGS Kyrgyzstan, Som
LAK Laos, Kip
LVL Latvia, Lat
LBP Lebanon, Pound
LSL Lesotho, Loti
LRD Liberia, Dollar
LYD Libya, Dinar
CHF Liechtenstein, Switzerland Franc
LTL Lithuania, Litas
EUR Luxembourg, Euro
LUF Luxembourg, Franc [obsolete]
MOP Macau, Pataca
MKD Macedonia, Denar
MGA Madagascar, Ariary
MGF Madagascar, Franc [obsolete]
EUR Madeira Islands, Euro
MWK Malawi, Kwacha
MYR Malaysia, Ringgit
MVR Maldives, Rufiyaa
XOF Mali, CFA Franc BCEAO
MTL Malta, Lira
FKP Malvinas (Falkland Islands), Pound
USD Marshall Islands, United States Dollar
EUR Martinique, Euro
MRO Mauritania, Ouguiya
MUR Mauritius, Rupee
EUR Mayotte, Euro
MXN Mexico, Peso
USD Micronesia, United States Dollar
USD Midway Islands, United States Dollar
MDL Moldova, Leu
EUR Monaco, Euro
MNT Mongolia, Tughrik
EUR Montenegro, Euro
XCD Montserrat, East Caribbean Dollar
MAD Morocco, Dirham
MZM Mozambique, Metical
MMK Myanmar (Burma), Kyat
NAD Namibia, Dollar
AUD Nauru, Australia Dollar
HTG Navassa, Haiti Gourde
USD Navassa, United States Dollar
CNY Nepal, China Yuan Renminbi
NPR Nepal, Rupee
ANG Netherlands Antilles, Guilder
EUR Netherlands, Euro
NLG Netherlands, Guilder [obsolete]
XPF New Caledonia, Comptoirs Français du Pacifique Franc
NZD New Zealand, Dollar
NIO Nicaragua, Cordoba
XOF Niger, CFA Franc BCEAO
NGN Nigeria, Naira
NZD Niue, New Zealand Dollar
AUD Norfolk Island, Australia Dollar
KPW North Korea, Won
USD Northern Mariana Islands, United States Dollar
NOK Norway, Krone
OMR Oman, Rial
PKR Pakistan, Rupee
USD Palau, United States Dollar
XPD Palladium Ounce
PAB Panama, Balboa
USD Panama, United States Dollar
PGK Papua New Guinea, Kina
CNY Paracel Islands, China Yuan Renminbi
VND Paracel Islands, Vietnam Dong
PYG Paraguay, Guarani
PEN Peru, Nuevo Sol
PHP Philippines, Peso
NZD Pitcairn, New Zealand Dollar
XPT Platinum Ounce
PLN Poland, Zloty
EUR Portugal, Euro
PTE Portugal, Escudo [obsolete]
USD Puerto Rico, United States Dollar
QAR Qatar, Riyal
EUR Reunion, Euro
ROL Romania, Leu
RUB Russia, Ruble
RWF Rwanda, Franc
ANG Saba, Netherlands Antilles Guilder
SHP Saint Helena, Pound
XCD Saint Kitts and Nevis, East Caribbean Dollar
XCD Saint Lucia, East Caribbean Dollar
EUR Saint Pierre and Miquelon, Euro
XCD Saint Vincent and The Grenadines, East Caribbean Dollar
EUR Saint-Martin, Euro
WST Samoa, Tala
EUR San Marino, Euro
STD São Tome and Principe, Dobra
SAR Saudi Arabia, Riyal
GBP Scotland (United Kingdom), Pound
SPL Seborga, Luigino
XOF Senegal, CFA Franc BCEAO
CSD Serbia, Dinar
SCR Seychelles, Rupee
SLL Sierra Leone, Leone
XAG Silver Ounce
SGD Singapore, Dollar
ANG Sint Eustatius, Netherlands Antilles Guilder
ANG Sint Maarten, Netherlands Antilles Guilder
SKK Slovakia, Koruna
SIT Slovenia, Tolar
SBD Solomon Islands, Dollar
SOS Somalia, Shilling
ZAR South Africa, Rand
GBP South Georgia, United Kingdom Pound
KRW South Korea, Won
GBP South Sandwich Islands, United Kingdom Pound
EUR Spain, Euro
ESP Spain, Peseta [obsolete]
LKR Sri Lanka, Rupee
SDD Sudan, Dinar
SRD Suriname, Dollar
SRG Suriname, Guilder
NOK Svalbard and Jan Mayen, Norway Krone
SZL Swaziland, Lilangeni
ZAR Swaziland, South Africa Rand
SEK Sweden, Krona
CHF Switzerland, Franc
SYP Syria, Pound
TWD Taiwan, New Dollar
TJS Tajikistan, Somoni
RUB Tajikistan, Russia Ruble
TZS Tanzania, Shilling
THB Thailand, Baht
XOF Togo, CFA Franc BCEAO
NZD Tokelau, New Zealand Dollar
TOP Tonga, Pa'anga
MDL Transnistria, Moldova Leu
TTD Trinidad and Tobago, Dollar
TND Tunisia, Dinar
TRY Turkey, New Lira
TRL Turkey, Lira
TMM Turkmenistan, Manat
USD Turks and Caicos Islands, United States Dollar
AUD Tuvalu, Australia Dollar
TVD Tuvalu, Dollar
UGX Uganda, Shilling
UAH Ukraine, Hryvna
AED United Arab Emirates, Dirham
GBP United Kingdom, Pound
USD United States, Dollar
UYU Uruguay, Peso
UZS Uzbekistan, Som
VUV Vanuatu, Vatu
EUR Vatican City, Euro
VAL Vatican City, Lira [obsolete]
VEB Venezuela, Bolivar
VND Vietnam, Dong
USD Virgin Islands, United States Dollar
USD Wake Island, United States Dollar
XPF Wallis and Futuna Islands, Comptoirs Français du Pacifique Franc
ILS West Bank, Israel New Shekel
JOD West Bank, Jordan Dinar
MAD Western Sahara, Morocco Dirham
WST Western Samoa (Samoa), Tala
YER Yemen, Rial
ZMK Zambia, Kwacha
ZWD Zimbabwe, Dollar
EOT
}
w3_config_hook () {
def SURFRAW_currency_from USD
def SURFRAW_currency_to EUR
}
w3_usage_hook () {
cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
Convert currencies with the Universal Currency Converter (www.xe.net/ucc)
Local options:
-l List all known currency symbols.
-from=SYM Symbol for currency to convert from.
Default: $SURFRAW_currency_from
Environment: SURFRAW_currency_from
-to=SYM Symbol for currency to convert to.
Default: $SURFRAW_currency_to
Environment: SURFRAW_currency_to
Example currency symbols:
EUR (Euro), USD (US Dollars), GBP (UK Pounds), CAD (Canada Dollars),
AUD (Australia Dollars), JPY (Japan Yen), INR (India Rupees),
NZD (New Zealand Dollars), CHF (Switzerland Francs), ZAR (South Africa Rand)
EOF
w3_global_usage
}
w3_parse_option_hook () {
opt="$1"
optarg="$2"
case "$opt" in
-from=*) setopt SURFRAW_currency_from $optarg ;;
-to=*) setopt SURFRAW_currency_to $optarg ;;
-l) list_currency_symbols; exit 0 ;;
*) return 1 ;;
esac
return 0
}
w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments
if test -z "$w3_args"; then
w3_browse_url "http://www.xe.net/ucc/"
else
escaped_args=`w3_url_of_arg $w3_args`
w3_browse_url "http://www.xe.com/ucc/convert.cgi?Amount=${escaped_args}&From=${SURFRAW_currency_from}&To=${SURFRAW_currency_to}&submit=Perform+Currency+Conversion"
fi
|