diff --git a/docling/cli/main.py b/docling/cli/main.py index c85a04f..e0f0cbd 100644 --- a/docling/cli/main.py +++ b/docling/cli/main.py @@ -60,6 +60,44 @@ err_console = Console(stderr=True) ocr_factory_internal = get_ocr_factory(allow_external_plugins=False) ocr_engines_enum_internal = ocr_factory_internal.get_enum() +DOCLING_ASCII_ART = r""" + ████ ██████ + ███░░██░░░░░██████ + ████████░░░░░░░░████████████ + ████████░░░░░░░░░░░░░░░░░░████████ + ██████░░░░░░░░░░░░░░░░░░░░░░░░░░██████ + ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█████ + ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█████ + ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████ + ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████ + ██████░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░██████ + ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████ + ██████░░░░░░ ░░░░░░░░░░░░░░░ ░░░░░░██████ + ███▒██░░░░░ ████ ░░░░░░░░░░░░ ████ ░░░░░██▒███ + ███▒██░░░░░░ ████ ░░░░░░░░░░░░ ████ ░░░░░██▒████ + ███▒██░░░░░░ ██ ██ ░░░░░░░░░░░░ ██ ██ ░░░░░██▒▒███ + ███▒███░░░░░ ██ ░░░░████░░░░ ██ ░░░░░██▒▒███ + ████▒▒██░░░░░░ ░░░███▒▒▒▒███░░░ ░░░░░░░██▒▒████ + ████▒▒██░░░░░░░░░░░░░░░░░█▒▒▒▒▒▒▒▒▒▒█░░░░░░░░░░░░░░░░███▒▒████ + ████▒▒▒██░░░░░░░░░░░░█████ ▒▒▒▒▒▒ ██████░░░░░░░░░░░██▒▒▒████ + ███▒▒▒▒██░░░░░░░░███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███░░░░░░░░██▒▒▒▒███ + ███▒▒▒▒▒███░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░███▒▒▒▒▒███ + ████▒▒▒▒▒████░░░░░░██████████████████████░░░░░░████▒▒▒▒▒████ + ███▒▒▒▒▒▒▒▒████░░░░░░░░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒███ + ████▒▒▒▒▒▒▒▒███░░░░░████████████████████████▒▒▒▒▒▒▒▒▒████ + ████▒▒▒▒▒▒██░░░░░░█ █░░░░░██▒▒▒▒▒▒████ + ████▒▒▒▒█░░░░░░░█ D O C L I N G █░░░░░░░░██▒▒▒████ + ████▒▒██░░░░░░█ █░░░░░░░░░░█▒▒████ + ██████░░░░░░█ D O C L I N G █░░░░░░░░░░░██████ + ████░░░░░█ █░░░░░░░░░░░░████ + █████░░█ D O C L I N G █░░░░░░░░░░░█████ + █████ █░░░░░░░░████████ + ██ D O C L I N G █░░░░░░░░█████ + █ █░░░████████ + █████████████████████████████ +""" + + app = typer.Typer( name="Docling", no_args_is_help=True, @@ -68,6 +106,12 @@ app = typer.Typer( ) +def logo_callback(value: bool): + if value: + print(DOCLING_ASCII_ART) + raise typer.Exit() + + def version_callback(value: bool): if value: docling_version = importlib.metadata.version("docling") @@ -356,6 +400,12 @@ def convert( device: Annotated[ AcceleratorDevice, typer.Option(..., help="Accelerator device") ] = AcceleratorDevice.AUTO, + docling_logo: Annotated[ + Optional[bool], + typer.Option( + "--logo", callback=logo_callback, is_eager=True, help="Docling logo" + ), + ] = None, ): if verbose == 0: logging.basicConfig(level=logging.WARNING)