From 3be65a261158d3b9d8b4e746f873159a89e0740e Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Mon, 13 Jul 2020 23:38:59 +0200 Subject: [PATCH] TODOs to implement #274 --- ocrd/ocrd/decorators.py | 9 +++++++++ ocrd/ocrd/processor/base.py | 3 +++ 2 files changed, 12 insertions(+) diff --git a/ocrd/ocrd/decorators.py b/ocrd/ocrd/decorators.py index a2aa44bf8b..17a2116ef3 100644 --- a/ocrd/ocrd/decorators.py +++ b/ocrd/ocrd/decorators.py @@ -66,6 +66,12 @@ def ocrd_cli_wrap_processor( # Merge parameter overrides and parameters if 'parameter_override' in kwargs: set_json_key_value_overrides(kwargs['parameter'], *kwargs['parameter_override']) + # TODO OCR-D/core#274 + # Assert -I / -O + # if not kwargs['input_file_grp']: + # raise ValueError('-I/--input-file-grp is required') + # if not kwargs['output_file_grp']: + # raise ValueError('-O/--output-file-grp is required') if is_local_filename(mets) and not isfile(get_local_filename(mets)): msg = "File does not exist: %s" % mets LOG.error(msg) @@ -120,6 +126,9 @@ def cli(mets_url): params = [ click.option('-m', '--mets', help="METS to process", default="mets.xml"), click.option('-w', '--working-dir', help="Working Directory"), + # TODO OCR-D/core#274 + # click.option('-I', '--input-file-grp', help='File group(s) used as input. **required**'), + # click.option('-O', '--output-file-grp', help='File group(s) used as output. **required**'), click.option('-I', '--input-file-grp', help='File group(s) used as input.', default='INPUT'), click.option('-O', '--output-file-grp', help='File group(s) used as output.', default='OUTPUT'), click.option('-g', '--page-id', help="ID(s) of the pages to process"), diff --git a/ocrd/ocrd/processor/base.py b/ocrd/ocrd/processor/base.py index ae7b46b4cf..00849bb910 100644 --- a/ocrd/ocrd/processor/base.py +++ b/ocrd/ocrd/processor/base.py @@ -179,6 +179,9 @@ def __init__( workspace, ocrd_tool=None, parameter=None, + # TODO OCR-D/core#274 + # input_file_grp=None, + # output_file_grp=None, input_file_grp="INPUT", output_file_grp="OUTPUT", page_id=None,