betty.console.command module

Provide the Command Line Interface.

class betty.console.command.Command

Bases: Plugin[CommandDefinition]

A console command plugin.

abstractmethod async configure(parser: argparse.ArgumentParser) CommandFunction

Configure the command.

Returns:

The command function, which is an async callable that returns None and takes all parser arguments as keyword arguments.

final class betty.console.command.CommandDefinition

Bases: HumanFacingDefinition, PluginClsDefinition[Command]

The command plugin type.

Plugin type ID

command

Definition

@CommandDefinition(...)

Built-in commands:

about (About)
Output information about Betty, and optionally your project
clear-caches (ClearCaches)
Clear all caches
config (Config)
Configure Betty
demo (Demo)
Explore a demonstration site
dev-profile-demo (DevProfileDemo)
Profile the generation of the demonstration site
dev-update-translations (DevUpdateTranslations)
Update all existing translations for Betty itself
docs (Docs)
View the documentation: View Betty's interactive documentation. This will open your web browser.
generate (Generate)
Generate a static site
new (New)
Create a new project
new-translation (NewTranslation)
Create a new translation
serve (Serve)
Serve a generated site: This will open your web browser.
update-translations (UpdateTranslations)
Update existing translations
__init__(plugin_id: ResolvableMachineName, *, label: ResolvableLocalizable, aliases: Iterable[str] = (), description: ResolvableLocalizable | None = None, requires: Requires = ())
property aliases: Sequence[str]

Any aliases for the command.

static type() PluginTypeDefinition[Self]

The plugin type definition.