collective.html2blocks.cli#
CLI entry point for collective.html2blocks.
The html2blocks script loads this module. The Typer application lives in
collective.html2blocks.cli_app and needs the cli extra. When that extra
is missing, cli() prints one line naming it and exits with status 1.
Example
uv run html2blocks convert input.html
uv run html2blocks info
uv run html2blocks server
- collective.html2blocks.cli.cli()[source]#
Run the collective.html2blocks CLI application.
This function serves as the entry point for the CLI, invoking the Typer app.
Example
>>> cli() # Launches the CLI
Typer application for the html2blocks command.
This module builds the Typer-based command-line interface for converting HTML
content to Volto blocks, inspecting conversion info, and running the API server.
It needs the cli extra. The html2blocks script loads it through
collective.html2blocks.cli, which reports the missing extra.
Example
uv run html2blocks convert input.html
uv run html2blocks info
uv run html2blocks server
- collective.html2blocks.cli_app.main(ctx: Context)[source]#
Main CLI callback for
collective.html2blocks.This function is invoked when the CLI is run without a subcommand. It displays a welcome message and help information for available commands.
- Parameters:
ctx (typer.Context) -- Typer context object.
Example
$ uv run html2blocks Welcome to collective.html2blocks.