Skip to content
Snippets Groups Projects

Typer for the command help

Merged Chosson Ulysse requested to merge FEATURE_typer_help into main
All threads resolved!

Files

+ 29
0
@@ -28,6 +28,7 @@ from .callback import (
version_callback,
yaml_file_callback,
)
from .help import display_md_file_content, get_resume
from .translate import do_filteration, do_validation
from .utils import display_error_no_debug
@@ -41,6 +42,34 @@ APP = typer.Typer(
CONSOLE = Console()
@APP.command(
name="help",
help="[bold white on black]Display help for Exo Import. "
":question_mark:[/bold white on black]",
rich_help_panel="Documentation",
)
def display_help(
topic: str = typer.Argument(
None,
help="Topic on which you want more information.",
show_default=False,
),
) -> None:
"""
Command use to display all help for Exo Import.
Args:
topic: Topic on which we want documentation. None by default which means
that we display the documentation of the help command.
"""
# TODO: Ecrire les fichier .md dans docs/help/
match topic:
case None:
CONSOLE.print(get_resume(), soft_wrap=True)
case _:
display_md_file_content(topic)
@APP.command(
name="translate",
help="[bold white on black]Translate a csv file to normalized "
Loading