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

-m, --mets <mets>

METS to process

-w, --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

-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