ocrd.cli.network module¶
OCR-D CLI: management of network components
ocrd network¶
Managing network components
Usage
ocrd network [OPTIONS] COMMAND [ARGS]...
client¶
A client for interacting with the network modules. The client CLI mimics the WebAPI endpoints
Usage
ocrd network client [OPTIONS] COMMAND [ARGS]...
discovery¶
The discovery endpoint of the WebAPI
Usage
ocrd network client discovery [OPTIONS] COMMAND [ARGS]...
processor¶
Get the json tool of a deployed processor specified with processor_name
Usage
ocrd network client discovery processor [OPTIONS] PROCESSOR_NAME
Options
- --address <address>¶
The URL of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” environment variable is used by default
Arguments
- PROCESSOR_NAME¶
Required argument
processors¶
Get a list of deployed processing workers. Each processor is shown only once regardless of the amount of deployed instances.
Usage
ocrd network client discovery processors [OPTIONS]
Options
- --address <address>¶
The URL of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” environment variable is used by default
processing¶
The processing endpoint of the WebAPI
Usage
ocrd network client processing [OPTIONS] COMMAND [ARGS]...
check-log¶
Check the log of a previously submitted processing job.
Usage
ocrd network client processing check-log [OPTIONS]
Options
- --address <address>¶
The URL of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” environment variable is used by default
- -j, --processing-job-id <processing_job_id>¶
Required
check-status¶
Check the status of a previously submitted processing job.
Usage
ocrd network client processing check-status [OPTIONS]
Options
- --address <address>¶
The URL of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” environment variable is used by default
- -j, --processing-job-id <processing_job_id>¶
Required
run¶
Submit a processing job to the processing server.
Usage
ocrd network client processing run [OPTIONS] PROCESSOR_NAME
Options
- --address <address>¶
The URL of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” environment variable is used by default
- -m, --mets <mets>¶
Required
- -I, --input-file-grp <input_file_grp>¶
- -O, --output-file-grp <output_file_grp>¶
- -g, --page-id <page_id>¶
- -p, --parameter <parameter>¶
Parameters, either JSON string or path to JSON file
- -P, --parameter-override <parameter_override>¶
Parameter override
- --result-queue-name <result_queue_name>¶
- --callback-url <callback_url>¶
- -b, --block¶
If set, the client will block till job timeout, fail or success.
- -p, --print-state¶
If set, the client will print job states by each iteration.
Arguments
- PROCESSOR_NAME¶
Required argument
workflow¶
The workflow endpoint of the WebAPI
Usage
ocrd network client workflow [OPTIONS] COMMAND [ARGS]...
check-status¶
Check the status of a previously submitted workflow job.
Usage
ocrd network client workflow check-status [OPTIONS]
Options
- --address <address>¶
The URL of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” environment variable is used by default
- -j, --workflow-job-id <workflow_job_id>¶
Required
- -v, --verbose¶
run¶
Submit a workflow job to the processing server.
Provide workflow either via tasks arguments (same syntax
as in ocrd process tasks arguments), or via -w file path
(same syntax, but newline separated).
Usage
ocrd network client workflow run [OPTIONS] [TASKS]...
Options
- --address <address>¶
The URL of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” environment variable is used by default
- -m, --path-to-mets <path_to_mets>¶
Required path to METS file of workspace to be processed (server-side path)
- -w, --path-to-workflow <path_to_workflow>¶
path to workflow file (server- or client-side path)
- --page-wise¶
Whether to generate per-page jobs
- -b, --block¶
If set, the client will block till job timeout, fail or success.
- -p, --print-state¶
If set, the client will print job states by each iteration.
Arguments
- TASKS¶
Optional argument(s)
workspace¶
The workspace endpoint of the WebAPI
Usage
ocrd network client workspace [OPTIONS] COMMAND [ARGS]...
processing-server¶
Start the Processing Server (proxy between the user and the Processing Worker(s))
Usage
ocrd network processing-server [OPTIONS] PATH_TO_CONFIG
Options
- -a, --address <address>¶
Required The URL of the Processing server, format: host:port
Arguments
- PATH_TO_CONFIG¶
Required argument
processing-worker¶
Start Processing Worker (a specific ocr-d processor consuming tasks from RabbitMQ queue)
Usage
ocrd network processing-worker [OPTIONS] PROCESSOR_NAME
Options
- -q, --queue <queue>¶
Required The URL of the Queue Server, format: amqp://username:password@host:port/vhost
- -d, --database <database>¶
Required The URL of the MongoDB, format: mongodb://host:port
Arguments
- PROCESSOR_NAME¶
Required argument
resmgr-server¶
Start standalone REST API OCR-D Resource Manager Server
Usage
ocrd network resmgr-server [OPTIONS]
Options
- -a, --address <address>¶
Required The URL of the OCR-D resource manager server, format: host:port