Site
¶
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.
SITES
= {}¶ - Site specific configuration data
-
cupage.
USER_AGENT
= 'cupage/0.8.2 +https://github.com/JNRowe/cupage/'¶ User agent to use for HTTP requests
-
class
cupage.
Site
(name, url, match_func='default', options=None, frequency=None, robots=True, checked=None, matches=None)[source]¶ Simple object for representing a web site.
-
check
(cache=None, timeout=None, force=False, no_write=False)[source]¶ Check site for updates.
Parameters: - cache (str) –
httplib2.Http
cache location - timeout (int) – Timeout value for
httplib2.Http
- force (bool) – Ignore configured check frequency
- no_write (bool) – Do not write to cache, useful for testing
- cache (str) –
-
find_sourceforge_matches
(content, charset)[source]¶ Extract matches from sourceforge content.
Parameters:
-
static
package_re
(name, ext, verbose=False)[source]¶ Generate a compiled
re
for the package.Parameters: - name (str) – File name to check for
- ext (str) – File extension to check
- verbose (bool) – Whether to enable
re.VERBOSE
-
state
¶ Return
Site
state for database storage.
-