ocrd.cli.resmgr module

OCR-D CLI: management of processor resources

ocrd resmgr

Managing processor resources

ocrd resmgr [OPTIONS] COMMAND [ARGS]...

download

Download resource NAME for processor EXECUTABLE.

NAME is the name of the resource made available by downloading or copying.

If NAME is ‘*’ (asterisk), then download all known registered resources for this processor.

If --any-url=URL or -n URL is given, then URL is accepted regardless of registered resources for NAME. (This can be used for unknown resources or for replacing registered resources.)

If --resource-type is set to archive, then that archive gets unpacked after download, and its --path-in-archive will subsequently be renamed to NAME.

ocrd resmgr download [OPTIONS] EXECUTABLE [NAME]

Options

-n, --any-url <any_url>

URL of unregistered resource to download/copy from

-D, --no-dynamic

Whether to skip looking into each processor’s –dump-{json,module-dir} for module-level resources

-t, --resource-type <resource_type>

Type of resource

Options:

file | directory | archive

-P, --path-in-archive <path_in_archive>

Path to extract in case of archive type

-a, --allow-uninstalled

Allow installing resources for uninstalled processors

-o, --overwrite

Overwrite existing resources

-l, --location <location>

Where to store resources - defaults to first location in processor’s ‘resource_locations’ list or finally ‘data’

Options:

data | cwd | system | module

Arguments

EXECUTABLE

Required argument

NAME

Optional argument

list-available

List available resources

ocrd resmgr list-available [OPTIONS]

Options

-D, --no-dynamic

Whether to skip looking into each processor’s –dump-{json,module-dir} for module-level resources

-e, --executable <EXEC>

Show only resources for executable beginning with EXEC

list-installed

List installed resources

ocrd resmgr list-installed [OPTIONS]

Options

-e, --executable <EXEC>

Show only resources for executable EXEC

migrate

Update the configuration after updating core to MIGRATION

ocrd resmgr migrate [OPTIONS] {2.37.0}

Arguments

MIGRATION

Required argument

ocrd.cli.resmgr.print_resources(executable, reslist, resmgr)[source]