cupage stores its configuration in ~/.cupage.conf by default, although you can specify a different location with the cupage list -f command line option.
The configuration file is a INI format file, with a section for each site definition. The section header is the site’s name which will be displayed in the update output, or used to select individual sites to check on the command line. Each section consists of a section of name=value option pairs.
An example configuration file is below:
[pep8] site = pypi match_type = tar [pydelicious] site = google code match_type = zip [pyisbn] url = http://www.jnrowe.ukfsn.org/_downloads/ select = pre > a match_type = tar frequency = 6m [upoints] url = http://www.jnrowe.ukfsn.org/_downloads/ select = pre > a match_type = tar [fruity] site = vim-script script = 1871 [cupage] site = github user = JNRowe frequency = 1m
Site definitions can either be specified entirely manually, or possibly with the built-in site matchers(see site option for available options).
The frequency option allows you to set a minimum time between checks for specific sites within the configuration file.
The format is <value> <units> where value can be a integer or float, and units must be one of the entries from the table below:
|m||Month, which is defined as 28 days|
|y||Year, which is defined as 13 m units|
If match_type is re then match must be a valid regular expression that will be used to match within the selected elements. For most common uses a prebuilt match_type already exists(see match_type option), and re should really only be used as a last resort.
The Python re module is used, and any functionality allowed by the module is available in the match option(with the notable exception of the verbose syntax).
The match_type value, if used, must be one of the following:
|gem||to match rubygems archives.|
|re||to define custom regular expressions|
|tar||to match gzip/bzip2/xz compressed tar archives(default)|
|zip||to match zip archives|
The match_type values simply select a predefined regular expression to use. The base match is <name>-[\d\.]+([_-](pre|rc)[\d]+)?\.<type>, where <name> is the section name and <type> is the value of match_type for this section.
The select option, if used, must be a valid CSS or XPath selector depending on the value of selector (see selector option) . Unless specified CSS Cascading Style Sheets) is the default selector type.
The selector option, if used, must be one of the following:
|css||To select elements within the page using CSS selectors (default)|
|xpath||To select elements within the page using XPath selectors|
The site option, if used, must be one of the following, hopefully self-explanatory values:
|github||v0.3.1||user (GitHub user name)|
|vim-script||v0.3.0||script (script id on the vim website)|
site options are simply shortcuts that are provided to reduce duplication in the configuration file. They define the values necessary to check for updates on the given site.
The url value is the location of the page to be checked for updates. If used, it must be a valid FTP/HTTP/HTTPS address.