linkcheck.configuration
Store metadata and options.
Functions
Get the SSL certifications installed by the certifi package. |
|
Return unicode string with detected module info. |
|
Get linkchecker plugin folders. |
|
Try to find a system-wide SSL certificate file. |
|
Get the user configuration filename. |
|
Get the user data folder. |
|
|
Create a child directory. |
|
Norm given system path with all available norm or expand functions in os.path. |
|
Split comma-separated host list. |
Classes
Storage for configuration options. |
- class linkcheck.configuration.Configuration[source]
Bases:
dict
Storage for configuration options. Options can both be given from the command line as well as from configuration files.
Initialize the default options.
- get_user_password(url)[source]
Get tuple (user, password) from configured authentication that matches the given URL. Both user and password can be None if not specified, or no authentication matches the given URL.
- read(files=None)[source]
Read settings from given config files.
- Raises:
LinkCheckerError on syntax errors in the config file(s)
- linkcheck.configuration.get_certifi_file()[source]
Get the SSL certifications installed by the certifi package.
- Returns:
the filename to the cert file
- Return type:
string
- Raises:
ImportError when certifi is not installed or ValueError when the file is not found
- linkcheck.configuration.get_modules_info()[source]
Return unicode string with detected module info.
- linkcheck.configuration.get_plugin_folders()[source]
Get linkchecker plugin folders. Default is “$XDG_DATA_HOME/linkchecker/plugins/” if $XDG_DATA_HOME is set, else “~/.local/share/linkchecker/plugins/”. “~/.linkchecker/plugins/” is also supported for backwards compatibility, and is used if it exists.
- linkcheck.configuration.get_system_cert_file()[source]
Try to find a system-wide SSL certificate file. :return: the filename to the cert file :raises: ValueError when no system cert file could be found
- linkcheck.configuration.get_user_config()[source]
Get the user configuration filename. If the user configuration file does not exist, copy it from the initial configuration file. Returns path to user config file (which might not exist due to copy failures). :return configuration filename :rtype string
- linkcheck.configuration.get_user_data()[source]
Get the user data folder. Returns “~/.linkchecker/” if this folder exists, “$XDG_DATA_HOME/linkchecker” if $XDG_DATA_HOME is set, else “~/.local/share/linkchecker”. :rtype string
- linkcheck.configuration.normpath(path)[source]
Norm given system path with all available norm or expand functions in os.path.
Modules
Parse configuration files |