## Exchange Rate Filters

If a webpage provides exchange rates, you can import these values into the NumericalChameleon. The website has to provide exchange rates and their corresponding ISO-4217-codes (e. g. USD, EUR, etc.). The ISO-codes are stored in "`<installationdirectory>/data/lists/iso4217.list`".
You can delete lines in this file to specify only the exchange rates you want. Exchange rate filters are stored in the direcotry "`<installationdirecotry>/data/rates/` ". The name of a filter ends with the suffix "`.filter`".

An example of an exchange rate filter for the "Pacific Exchange Rate Services" website is
(`Installationdirectory/data/rates/pacific.commerce.ubc.ca.filter`)

`name=Pacific Exchange Rate Service` `visit=http://pacific.commerce.ubc.ca/xr/rates.html` `description=\` `Service from University of British Columbia, Vancouver, Canada.\n\n\` `This service provides 264 exchange rates (172 unique).\n\` `Filter written by jonelo.\n\` `instruction=Save webpage as file and then include the file.` `syntax=perl5` `date=<title>Rates as of (.+?) Pacific Time</title>` `before_iso=<tt>` `after_iso=</tt></td>(\\s+?<td.+?>.+?</td>){3}\\s+?<td.+?>(<b>)?\\s*(.+?)(</b>)?</td>` `decimalSeparator=,` `decimalPoint=.`

Description of all keywords:

Keyword | Impact | Description
enabled | Functional | optional; specifies whether the exchange rates filter is active or not (true or false), if the key is missing, the filter is enabled
name | Visual | the name of the exchange rate service
country | Visual | since NC 2.0.0; the country where the exchange rate service is located (
visit | Filter | the URL of the exchange rate service
visit.additional | Filter | since NC 2.0.0; number; how many additional addresses are available?
visit.<number> | Filter | since NC 2.0.0; an additional address of the exchange rate service
description | Visual | a short description of the exchange rate service, will be used if there is no suitable description_<language> entry
description_<language> | Visual | since NC 2.0.0; like description, but localized, <language> must be a two-character code according to ISO 3166, "de" for german for example
instruction | Visual | some instructions what to do at the website of the exchange rate service, will be used if there is no suitable instruction_<language> entry
instruction_<language> | Visual | since NC 2.0.0; like instruction, but localized, <language> must be a two-character code according to ISO 3166, "de" for german for example
date | Filter | a regular expression for the date, brackets define the actual string of the date. If you set date=today the current date is used for the date.
before_iso | Filter | a regular expression before the ISO 4217 code, brackets will define strings
before_iso_inv | Filter | seit NC 1.5.0; a regular expression before the ISO 4217 code, brackets will define strings (rate will be recalculated with 1/rate)
after_iso | Filter | a regular expression after the ISO 4217 code, brackets will define strings
after_iso_inv | Filter | seit NC 1.5.0; a regular expression after the ISO 4217 code, brackets will define strings (rate will be recalculated with 1/rate)
decimalSeparator | Filter | which character represents the separator between digits?
decimalPoint | Filter | which character represents the decimal point?
logic | Filter | since NC 1.3.0; will be put in in field logic of category "exchange rates", default ist "false"; optional
filechooser | Visual | since NC 1.3.0; optional; which file postfixes should be supported by the open dialog? (e. g. "html, htm")
valuepos | Filter | since NC 1.3.0; optional; default=1; what bracket defines the value in string "before_iso+ISO+after_iso"? (e. g. "1")
base | Filter | since NC 1.4.0; optional; a three character ISO 4217 code which represents factor 1, (e. g. "USD")
factorpos | Filter | since NC 2.0.0; optional; which bracket content defines the factor of the value in the string "before_iso+ISO+after_iso"? (e. g. "1"); use either factorpos or factorForAll
factorForAll | Filter | since NC 2.0.0; optional; the exchange rate is the price in the "base" unit for "factorForAll" units of the foreign currency; use either factorpos or factorForAll
removeTags | Filter | since NC 2.0.0; optional; default=false; the value can contain HTML-tags, if "true" those tags will be removed.
removeWhitespaces | Filter | since NC 2.0.1; optional; default=false; the value can contain whitespaces, if "true" those whitespaces will be removed.
replaceCodes | Filter | since NC 2.0.0; optional; default=false; the value can contain HTML-codes, if "true" those codes will be translated
removeCommentBeforeParsing | Performance | since NC 2.0.0; optional; default=false; all HTML comment blocks will be removed before the parsing.
searchOnlyFor | Performance | since NC 2.0.0; optional; ISO codes must be separated by a comma, only those are taken into account for the search function. This option can improve the performance for parsing the values from a HTML page. On the other side of the coin, this increases also the effort which is necessary to keep a filter file up to date.
cutHead | Performance | since NC 2.0.0; optional; cuts content from begin of the page to the end of the string cutHead. This option can improve the performance for parsing values from a HTML page, because less content must be parsed.
cutBottom | Performance | since NC 2.0.0; optional; cuts content from the begin of the cutBottom string to the end of the page. This option can improve the performance for parsing values from a HTML page, because less content must be parsed.
directDownload | Function | since NC 2.0.0; optional; specifies whether a direct download is suitable. Default is false. Set it to true only if the user isn't required to do any actions on a website.