art: trailing whitespace, argument order synopsis for process
@@ -16,9 +16,11 @@ from ocrd.decorators import ocrd_cli_options
@click.argument('steps', nargs=-1)
def process_cli(mets, steps, **kwargs):
"""
- Execute OCR-D processors for a METS file directly.
+ Execute OCR-D processor executables for a METS file.
Run each of the STEPS executables one after another.
+
+ Order of comma-separated values for -I, -O, -p corresponds to order of steps.
"""
resolver = Resolver()
workspace = resolver.workspace_from_url(mets)
@@ -37,11 +39,11 @@ def process_cli(mets, steps, **kwargs):
# fixme: this really should be coming from workflow engine (giving steps, i/o fileGrps, parameter files)
# fixme: using the command line here is inefficient
# fixme: someone should go and check if the first input_file_grp actually exists
- if not 'input_file_grp' in kwargs:
+ if 'input_file_grp' not in kwargs:
raise Exception("Need input_file_grp USE(s)")
- if not 'output_file_grp' in kwargs:
+ if 'output_file_grp' not in kwargs:
raise Exception("Need output_file_grp USE(s)")
- if not 'parameter' in kwargs:
+ if 'parameter' not in kwargs:
raise Exception("Need parameter file(s)")
input_file_grps = kwargs['input_file_grp'].split(',')
if len(input_file_grps) != len(steps):
