factory
appimage_updater.commands.factory
¶
Command factory for creating command instances.
CommandFactory
¶
Factory for creating command instances from CLI parameters.
create_add_command(name=None, url=None, download_dir=None, create_dir=False, yes=False, no=False, config_file=None, config_dir=None, rotation=None, retain=5, symlink=None, prerelease=None, basename=None, checksum=None, checksum_algorithm='sha256', checksum_pattern='', checksum_required=None, pattern=None, version_pattern=None, direct=None, auto_subdir=None, verbose=False, dry_run=False, interactive=False, examples=False, debug=False, output_format=None)
staticmethod
¶
Create an AddCommand instance.
Source code in src/appimage_updater/commands/factory.py
create_check_command_with_instrumentation(app_names=None, config_file=None, config_dir=None, dry_run=False, yes=False, no=False, no_interactive=False, verbose=False, debug=False, instrumentation=None, output_format='rich')
staticmethod
¶
Create a CheckCommand instance using InstrumentationParams.
This is a convenience method that reduces parameter list complexity by accepting an InstrumentationParams object instead of individual instrumentation parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
app_names
|
list[str] | None
|
List of application names to check |
None
|
config_file
|
Path | None
|
Path to configuration file |
None
|
config_dir
|
Path | None
|
Path to configuration directory |
None
|
dry_run
|
bool
|
Whether to run in dry-run mode |
False
|
yes
|
bool
|
Automatically answer yes to prompts |
False
|
no
|
bool
|
Automatically answer no to prompts |
False
|
no_interactive
|
bool
|
Disable interactive prompts |
False
|
verbose
|
bool
|
Enable verbose output |
False
|
debug
|
bool
|
Enable debug output |
False
|
instrumentation
|
InstrumentationParams | None
|
Instrumentation parameters object |
None
|
output_format
|
str
|
Output format (rich, plain, json, html) |
'rich'
|
Returns:
Type | Description |
---|---|
CheckCommand
|
CheckCommand instance |
Source code in src/appimage_updater/commands/factory.py
create_config_command(action, setting='', value='', app_name='', config_file=None, config_dir=None, debug=False, output_format=None)
staticmethod
¶
Create a ConfigCommand instance.
Source code in src/appimage_updater/commands/factory.py
create_edit_command(app_names=None, config_file=None, config_dir=None, url=None, download_dir=None, basename=None, pattern=None, version_pattern=None, rotation=None, retain_count=None, symlink_path=None, prerelease=None, checksum=None, checksum_algorithm=None, checksum_pattern=None, checksum_required=None, direct=None, enable=None, force=False, create_dir=False, yes=False, no=False, auto_subdir=None, verbose=False, dry_run=False, debug=False, output_format=None)
staticmethod
¶
Create an EditCommand instance.
Source code in src/appimage_updater/commands/factory.py
create_list_command(config_file=None, config_dir=None, debug=False, output_format=None)
staticmethod
¶
Create a ListCommand instance.
Source code in src/appimage_updater/commands/factory.py
create_remove_command(app_names=None, config_file=None, config_dir=None, yes=False, no=False, verbose=False, debug=False, output_format=None)
staticmethod
¶
Create a RemoveCommand instance.
Source code in src/appimage_updater/commands/factory.py
create_repository_command_with_instrumentation(app_names=None, config_file=None, config_dir=None, assets=False, limit=10, dry_run=False, instrumentation=None, verbose=False, debug=False, output_format=None)
staticmethod
¶
Create a RepositoryCommand instance using InstrumentationParams.
This is a convenience method that reduces parameter list complexity by accepting an InstrumentationParams object instead of individual instrumentation parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
app_names
|
list[str] | None
|
List of application names |
None
|
config_file
|
Path | None
|
Path to configuration file |
None
|
config_dir
|
Path | None
|
Path to configuration directory |
None
|
assets
|
bool
|
Whether to show assets |
False
|
limit
|
int
|
Maximum number of releases to fetch |
10
|
dry_run
|
bool
|
Whether to run in dry-run mode |
False
|
instrumentation
|
InstrumentationParams | None
|
Instrumentation parameters object |
None
|
verbose
|
bool
|
Enable verbose output |
False
|
debug
|
bool
|
Enable debug output |
False
|
output_format
|
Any
|
Output format |
None
|
Returns:
Type | Description |
---|---|
RepositoryCommand
|
RepositoryCommand instance |
Source code in src/appimage_updater/commands/factory.py
create_show_command(app_names=None, add_command=False, config_file=None, config_dir=None, verbose=False, debug=False, output_format=None)
staticmethod
¶
Create a ShowCommand instance.