From 391d78440a660778f17f932bea7bea31904a79da Mon Sep 17 00:00:00 2001 From: Tito Brasolin Date: Wed, 9 Oct 2024 13:51:15 +0200 Subject: [PATCH] feat: progress command line flag --- scp_udg_client_app/cli.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scp_udg_client_app/cli.py b/scp_udg_client_app/cli.py index ed98601..8bf93e9 100644 --- a/scp_udg_client_app/cli.py +++ b/scp_udg_client_app/cli.py @@ -15,6 +15,7 @@ from scp_udg_client_app.config import Config config = Config() + @click.group() @click.option( "--config", @@ -29,11 +30,16 @@ config = Config() "--verbose", is_flag=True, default=False, - help="Enable verbose output for debugging purposes.") + help="Whether to be more verbose with the logging output.") +@click.option( + "--progress", + is_flag=True, + default=False, + help="Whether to output progress information on the files being processed.") @click.version_option() @click.pass_context -def cli(ctx, verbose): - ctx.obj = {"verbose": verbose} +def cli(ctx, verbose, progress): + ctx.obj = {"verbose": verbose, "progress": progress} ctx.default_map = config.build_default_map() @@ -45,4 +51,4 @@ cli.add_command(report.report) cli.add_command(validate.validate) cli.add_command(poll.poll) -main = cli \ No newline at end of file +main = cli -- GitLab