ocrd.cli.network module¶
OCR-D CLI: management of network components
ocrd network¶
Managing network components
ocrd network [OPTIONS] COMMAND [ARGS]...
client¶
A client for interacting with the network modules. The client CLI mimics the WebAPI endpoints
ocrd network client [OPTIONS] COMMAND [ARGS]...
discovery¶
The discovery endpoint of the WebAPI
ocrd network client discovery [OPTIONS] COMMAND [ARGS]...
processor¶
Get the json tool of a deployed processor specified with processor_name
ocrd network client discovery processor [OPTIONS] PROCESSOR_NAME
Options
- --address <address>¶
The address of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” env variable is used by default
Arguments
- PROCESSOR_NAME¶
Required argument
processors¶
Get a list of deployed processing workers/processor servers. Each processor is shown only once regardless of the amount of deployed instances.
ocrd network client discovery processors [OPTIONS]
Options
- --address <address>¶
The address of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” env variable is used by default
processing¶
The processing endpoint of the WebAPI
ocrd network client processing [OPTIONS] COMMAND [ARGS]...
check-log¶
Check the log of a previously submitted processing job.
ocrd network client processing check-log [OPTIONS]
Options
- --address <address>¶
The address of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” env variable is used by default
- -j, --processing-job-id <processing_job_id>¶
Required
check-status¶
Check the status of a previously submitted processing job.
ocrd network client processing check-status [OPTIONS]
Options
- --address <address>¶
The address of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” env variable is used by default
- -j, --processing-job-id <processing_job_id>¶
Required
run¶
Submit a processing job to the processing server.
ocrd network client processing run [OPTIONS] PROCESSOR_NAME
Options
- --address <address>¶
The address of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” env 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>¶
- --agent-type <agent_type>¶
- -b, --block <block>¶
If set, the client will block till job timeout, fail or success.
Arguments
- PROCESSOR_NAME¶
Required argument
workflow¶
The workflow endpoint of the WebAPI
ocrd network client workflow [OPTIONS] COMMAND [ARGS]...
check-status¶
Check the status of a previously submitted workflow job.
ocrd network client workflow check-status [OPTIONS]
Options
- --address <address>¶
The address of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” env variable is used by default
- -j, --workflow-job-id <workflow_job_id>¶
Required
run¶
Submit a workflow job to the processing server.
ocrd network client workflow run [OPTIONS]
Options
- --address <address>¶
The address of the Processing Server. If not provided, the “OCRD_NETWORK_SERVER_ADDR_PROCESSING” env variable is used by default
- -m, --path-to-mets <path_to_mets>¶
Required
- -w, --path-to-workflow <path_to_workflow>¶
Required
- -b, --block <block>¶
If set, the client will block till job timeout, fail or success.
workspace¶
The workspace endpoint of the WebAPI
ocrd network client workspace [OPTIONS] COMMAND [ARGS]...
processing-server¶
Start the Processing Server (proxy between the user and the Processing Worker(s) / Processor Server(s))
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)
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
processor-server¶
Start Processor Server (standalone REST API OCR-D processor)
ocrd network processor-server [OPTIONS] PROCESSOR_NAME
Options
- -a, --address <address>¶
Required The URL of the processor server, format: host:port
- -d, --database <database>¶
Required The URL of the MongoDB, format: mongodb://host:port
Arguments
- PROCESSOR_NAME¶
Required argument