ocrd.cli.ocrd_tool module

OCR-D CLI: ocrd-tool.json management

ocrd ocrd-tool

Work with ocrd-tool.json JSON_FILE

ocrd ocrd-tool [OPTIONS] JSON_FILE COMMAND [ARGS]...

Arguments

JSON_FILE

Required argument

list-tools

List tools

ocrd ocrd-tool JSON_FILE list-tools [OPTIONS]

tool

Work with a single tool TOOL_NAME

ocrd ocrd-tool JSON_FILE tool [OPTIONS] TOOL_NAME COMMAND [ARGS]...

Arguments

TOOL_NAME

Required argument

categories

Categories of tool

ocrd ocrd-tool JSON_FILE tool TOOL_NAME categories [OPTIONS]

description

Describe tool

ocrd ocrd-tool JSON_FILE tool TOOL_NAME description [OPTIONS]

dump

Dump JSON of tool

ocrd ocrd-tool JSON_FILE tool TOOL_NAME dump [OPTIONS]

help

Generate help for processors

ocrd ocrd-tool JSON_FILE tool TOOL_NAME help [OPTIONS] [SUBCOMMAND]

Arguments

SUBCOMMAND

Optional argument

list-resources

List tool’s file resources

ocrd ocrd-tool JSON_FILE tool TOOL_NAME list-resources [OPTIONS]

parse-params

Parse parameters with fallback to defaults and output as shell-eval’able assignments to params var.

ocrd ocrd-tool JSON_FILE tool TOOL_NAME parse-params [OPTIONS]

Options

-p, --parameter <parameter>

Parameters, either JSON string or path to JSON file

-P, --parameter-override <parameter_override>

Parameter override

-j, --json

Output JSON instead of shell variables

show-resource

Dump a tool’s file resource

ocrd ocrd-tool JSON_FILE tool TOOL_NAME show-resource [OPTIONS] RES_NAME

Arguments

RES_NAME

Required argument

steps

Steps of tool

ocrd ocrd-tool JSON_FILE tool TOOL_NAME steps [OPTIONS]

validate

Validate an ocrd-tool.json

ocrd ocrd-tool JSON_FILE validate [OPTIONS]

version

Version of ocrd-tool.json

ocrd ocrd-tool JSON_FILE version [OPTIONS]
class ocrd.cli.ocrd_tool.OcrdToolCtx(filename)[source]

Bases: object