Configuration tweaks
Remo's configuration data is contained in the file remo_config.rb
in the root directory for the Remo source code (/usr/local/src/remo-0.2.0
in our example). This file can be edited to tweak the Remo configuration. For example, if you want to add a custom data field to the drop-down boxes in Remo, then this is easy to accomplish. Simply find the "standard domains" mapping that looks like this:
# Standard domain to regex mapping STANDARD_DOMAINS = { # name - value pairs "Hostname" => '[0-9a-zA-Z-.]{1,64}', "IP Address V4" => '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}', ...
and add your own entry to the list. For example, if you wanted a data type for an MD5 sum, you could add the following line to STANDARD_DOMAINS:
"MD5 Sum" => '[0-9a-zA-Z]{32}',
This will add a new data type called MD5 Sum
, with a regular expression that allows a 32-character string of digits and letters. Remo also needs to know that this new data type should be displayed in the default drop-down...