From 7f4c981abee734b8dd8132925ea8e62a3df5fc38 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Wed, 9 Mar 2022 07:08:34 -0800 Subject: [PATCH] Added --no-progress, #655 --- osxphotos/cli/export.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osxphotos/cli/export.py b/osxphotos/cli/export.py index 35d27649..effdf05b 100644 --- a/osxphotos/cli/export.py +++ b/osxphotos/cli/export.py @@ -92,6 +92,9 @@ from .verbose import get_verbose_console, time_stamp, verbose_print @DB_OPTION @click.option("--verbose", "-V", "verbose", is_flag=True, help="Print verbose output.") @click.option("--timestamp", is_flag=True, help="Add time stamp to verbose output") +@click.option( + "--no-progress", is_flag=True, help="Do not display progress bar during export." +) @QUERY_OPTIONS @click.option( "--missing", @@ -691,6 +694,7 @@ def export( to_time, verbose, timestamp, + no_progress, missing, update, force_update, @@ -940,6 +944,7 @@ def export( no_likes = cfg.no_likes no_location = cfg.no_location no_place = cfg.no_place + no_progress = cfg.no_progress no_title = cfg.no_title not_burst = cfg.not_burst not_favorite = cfg.not_favorite @@ -1390,7 +1395,7 @@ def export( ) photo_num = 0 - with rich_progress(console=get_verbose_console()) as progress: + with rich_progress(console=get_verbose_console(), mock=no_progress) as progress: task = progress.add_task( f"Exporting [num]{num_photos}[/] photos", total=num_photos )