ocrd.cli.bashlib module¶
OCR-D CLI: bash library
ocrd bashlib¶
Work with bash library
ocrd bashlib [OPTIONS] COMMAND [ARGS]...
constants¶
Query constants from ocrd_utils and ocrd_models
ocrd bashlib constants [OPTIONS] NAME
Arguments
- NAME¶
Required argument
filename¶
Dump the bash library filename for sourcing by shell scripts
For functions exported by bashlib, see ../../README.md
ocrd bashlib filename [OPTIONS]
input-files¶
List input files for processing
Instantiate a processor and workspace from the given processing options.
Then loop through the input files of the input fileGrp, and for each one,
print its url, ID, mimetype and pageId, as well as its recommended
outputFileId (from make_file_id
).
(The printing format is one associative array initializer per line.)
ocrd bashlib input-files [OPTIONS]
Options
- --ocrd-tool <ocrd_tool>¶
path to ocrd-tool.json of processor to feed
- --executable <executable>¶
name of processor executable in ocrd-tool.json
- -m, --mets <mets>¶
METS to process
- -U, --mets-server-url <mets_server_url>¶
TCP host URI or UDS path of METS server
- -d, --working-dir <working_dir>¶
Working Directory
- -I, --input-file-grp <input_file_grp>¶
File group(s) used as input.
- -O, --output-file-grp <output_file_grp>¶
File group(s) used as output.
- -g, --page-id <page_id>¶
ID(s) of the pages to process
- --overwrite¶
Remove output pages/images if they already exist (with ‘–page-id’, remove only those). Short-hand for OCRD_EXISTING_OUTPUT=OVERWRITE
- --debug¶
Abort on any errors with full stack trace. Short-hand for OCRD_MISSING_OUTPUT=ABORT
- -p, --parameter <parameter>¶
Parameters, either JSON string or path to JSON file
- -P, --parameter-override <parameter_override>¶
Parameter override
- -l, --log-level <log_level>¶
Log level
- Options:
OFF | ERROR | WARN | INFO | DEBUG | TRACE