Skip to content

Commit

Permalink
TODOs to implement #274
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Jul 13, 2020
1 parent 903ac6c commit 3be65a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ocrd/ocrd/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"),
Expand Down
3 changes: 3 additions & 0 deletions ocrd/ocrd/processor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3be65a2

Please sign in to comment.