ocrd.processor.helpers module

Helper methods for running and documenting processors

ocrd.processor.helpers.generate_processor_help(ocrd_tool, processor_instance=None)[source]

Generate a string describing the full CLI of this processor including params.

Parameters
  • ocrd_tool (dict) – this processor’s tools section of the module’s ocrd-tool.json

  • processor_instance (object, optional) – the processor implementation (for adding any module/class/function docstrings)

ocrd.processor.helpers.run_cli(executable, mets_url=None, resolver=None, workspace=None, page_id=None, overwrite=None, log_level=None, input_file_grp=None, output_file_grp=None, parameter=None, working_dir=None)[source]

Create a workspace for mets_url and run MP CLI through it

ocrd.processor.helpers.run_processor(processorClass, ocrd_tool=None, mets_url=None, resolver=None, workspace=None, page_id=None, log_level=None, input_file_grp=None, output_file_grp=None, parameter=None, parameter_override=None, working_dir=None)[source]

Create a workspace for mets_url and run processor through it

Parameters

parameter (string) – URL to the parameter