webchanges.config module
Command-line configuration.
- class webchanges.config.BaseConfig(config_path, config_file, jobs_def_file, hooks_def_file, ssdb_file, jobs_files=<factory>, hooks_files=<factory>)
Bases:
objectBase configuration class.
- Parameters:
config_path (Path)
config_file (Path)
jobs_def_file (Path)
hooks_def_file (Path)
ssdb_file (Path)
jobs_files (list[Path])
hooks_files (list[Path])
- config_path: Path
- config_file: Path
- jobs_def_file: Path
- hooks_def_file: Path
- ssdb_file: Path
- jobs_files: list[Path]
- hooks_files: list[Path]
- class webchanges.config.CommandConfig(args, config_path, config_file, jobs_def_file, hooks_def_file, ssdb_file)
Bases:
BaseConfigCommand line arguments configuration; the arguments are stored as class attributes.
Command line arguments configuration; the arguments are stored as class attributes.
- Parameters:
args (list[str]) – The args from the command line.
config_path (Path) – The path of the configuration directory.
config_file (Path) – The path of the configuration file.
jobs_def_file (Path) – The glob of the jobs file(s).
hooks_def_file (Path) – The path of the Python hooks file.
ssdb_file (Path) – The path of the database file (or directory if using the textfiles database-engine) where snapshots are stored.
- add: str | None
- change_location: tuple[int | str, str] | None
- check_new: bool
- clean_database: int | None
- database_engine: str | None
- delete: str | None
- delete_snapshot: str | None
- detailed_versions: bool
- dump_history: str | None
- edit: bool
- edit_config: bool
- edit_hooks: bool
- errors: str | None
- features: bool
- footnote: str | None
- gc_database: int | None
- install_chrome: bool
- joblist: list[str | int]
- list_jobs: bool | str | None
- log_file: Path
- max_snapshots: int | None
- max_workers: int | None
- no_headless: bool
- prepare_jobs: bool
- rollback_database: str | None
- smtp_login: bool
- telegram_chats: bool
- test_differ: list[str] | None
- test_job: bool | str | None
- test_reporter: str | None
- verbose: int | None
- xmpp_login: bool
- jobs_files: list[Path]
- hooks_files_inputted: bool
- hooks_files: list[Path]
- class CustomHelpFormatter(prog)
Bases:
RawDescriptionHelpFormatterInitialize the help formatter.
- Parameters:
prog (str) – The program name.
- add_argument(action)
- add_arguments(actions)
- add_text(text)
- add_usage(usage, actions, groups, prefix=None)
- end_section()
- format_help()
- start_section(heading)
- config_path: Path
- config_file: Path
- jobs_def_file: Path
- hooks_def_file: Path
- ssdb_file: Path
- parse_args(cmdline_args)
Set up the Python arguments parser and stores the arguments in the class’s variables.
- Returns:
The Python arguments parser.
- Parameters:
cmdline_args (list[str])
- Return type:
ArgumentParser