Command line¶
Note
The documentation in this section is aimed at people wishing to contribute to cupage, and can be skipped if you are simply using the tool from the command line.
-
cupage.cmdline.
USAGE
= '%(prog)s checks web pages and displays changes from the last run that match\na given criteria. Its original purpose was to check web pages for new software\nreleases, but it is easily configurable and can be used for other purposes.'¶ Command line help string, for use with
argparse
-
cupage.cmdline.
add
()¶ Add new site to config.
Parameters: - config (str) – Location of config file
- site (str) – Site helper to match with
- match_type (str) – Filename match pattern
- match (str) – Regular expression to use when
match_type
isre
- frequency (str) – Update frequency
- select (str) – Page content to check
- site – Type of selector to use
- name (str) – Name for new entry
-
cupage.cmdline.
check
()¶ Check sites for updates.
Parameters: - globs (dict) – Global options object
- config (str) – Location of config file
- database (str) – Location of database file
- cache (str) – Location of cache directory
- write (bool) – Whether to update cache/database
- force (bool) – Force update regardless of
frequency
setting - frequency (datetime.timedelta) – Update frequency
- timeout (int) – Network timeout in seconds
- pages (
list
ofstr
) – Pages to check
-
cupage.cmdline.
list_conf
()¶ List site definitions in config file.
Parameters: