From 22e5d1e054fbf77dc72f3c9756d0919265639880 Mon Sep 17 00:00:00 2001 From: Mark Jordan Date: Tue, 3 Dec 2024 17:33:15 -0800 Subject: [PATCH] Resolves #857 and #858. --- workbench | 12 ++++++++++++ workbench_utils.py | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/workbench b/workbench index 391f325..a82b54e 100755 --- a/workbench +++ b/workbench @@ -3507,6 +3507,14 @@ parser.add_argument( "--rollback_csv_file_path", help="Overrides the 'rollback_csv_file_path' configuration setting.", ) +parser.add_argument( + "--csv_start_row", + help="Overrides the 'csv_start_row' configuration setting.", +) +parser.add_argument( + "--csv_stop_row", + help="Overrides the 'csv_stop_row' configuration setting.", +) parser.add_argument("--version", action="version", version="Islandora Workbench 0.0.0") args = parser.parse_args() @@ -3539,6 +3547,10 @@ if args.rollback_config_file_path is not None: config["rollback_config_file_path"] = args.rollback_config_file_path if args.rollback_csv_file_path is not None: config["rollback_csv_file_path"] = args.rollback_csv_file_path +if args.csv_start_row is not None: + config["csv_start_row"] = int(args.csv_start_row) +if args.csv_stop_row is not None: + config["csv_stop_row"] = int(args.csv_stop_row) if args.print_config is True: print("\nCurrent Islandora Workbench configuration, including defaults") diff --git a/workbench_utils.py b/workbench_utils.py index c5b9cb5..cf68297 100644 --- a/workbench_utils.py +++ b/workbench_utils.py @@ -9016,6 +9016,8 @@ def get_rollback_csv_filepath(config): { "config_filename": config_filename, "input_csv_filename": input_csv_filename, + "csv_start_row": str(config["csv_start_row"]), + "csv_stop_row": str(config["csv_stop_row"]), } ) ) @@ -9084,6 +9086,8 @@ def get_rollback_config_filepath(config): { "config_filename": config_filename, "input_csv_filename": input_csv_filename, + "csv_start_row": str(config["csv_start_row"]), + "csv_stop_row": str(config["csv_stop_row"]), } ) )