Simple CLI util for running OCR on images through PERO OCR API

pero_ocr

Simple CLI util for running OCR on images through PERO OCR API

Usage:

Usage of batch_pero_ocr:
  -c string
        cancel request with given id
  -d string
        dir to ocr in-place
  -e int
        engine id for use in ocr process (default 1)
  -engines
        ask ocr server for available engines information
  -pull-only string
        only download alto + txt for given request id

Config example

Config is stored in users $HOME directory as .ocrtools.yml. When no config is available in invoking directory or home dir, new config templated is created in $HOME/.ocrtools.yml.

pero:
  api_key: api-key-here
  default_engine: 1
  endpoint: https://pero-ocr.fit.vutbr.cz/api/

Please mind, that trailing slash "/" in endpoint is mandatory.

Creating OCR

./pero_ocr -d <dir with images>

While ocr is running every event is logged into ocr_log.txt located in directory with images. Request ID is recorded on the begining of log, which may be used later for canceling ocr request or additional download of OCR and ALTO files. Default selected engine is engine with id 1, which should be: czech_old_printed, engine with id 2 should be: czech_old_handwritten.

Engine selection is done by -e switch in combination with -d switch.

All available engines can be printout by ./pero_ocr -engines.

Cancel OCR request

./pero_ocr -c <request id>

Additional download OCR and ALTO

Downloads OCR and ALTO from given request id into the target directory.

./pero_ocr -pull-only <request id> -d <dir with images>

How to build

$ go build
Owner
Similar Resources

✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

Dec 31, 2022

A CLI tool for running Go commands with colorized output

A CLI tool for running Go commands with colorized output

Goli Goli is a CLI Tool for running Go commands with colorized output. Note: Goli is still a WIP. It has very basic commands and limitations. Feel fre

Nov 24, 2022

Runc: a CLI tool for spawning and running containers on Linux according to the OCI specification

runc Introduction runc is a CLI tool for spawning and running containers on Linux according to the OCI specification. This repo contains a lightly mod

Dec 16, 2021

Clirunner - Package clirunner runs a legacy shell-style CLI as if a human were running it.

clirunner Package clirunner runs a legacy shell-style command-line interpreter (CLI) as if a human were running it. A shell-style CLI offers a prompt

Jan 4, 2022

K-Mesh is an experimental Knative distribution which provides a fresh, CLI-focused, holistic user experience of running and managing Knative.

K-Mesh is an experimental Knative distribution which provides a fresh, CLI-focused, holistic user experience of running and managing Knative. N

Feb 14, 2022

A simple tool which you can use to move through your directories from the command line

Fe What is Fe ? Fe is a simple tool which you can use to move through your direc

Jan 1, 2022

Vfkit - Simple command line tool to start VMs through virtualization framework

vfkit - Simple command line tool to start VMs through virtualization framework v

Oct 21, 2022

A simple go program which checks if your websites are running and runs forever (stop it with ctrl+c). It takes two optional arguments, comma separated string with urls and an interval.

uptime A simple go program which checks if your websites are running and runs forever (stop it with ctrl+c). It takes two optional arguments: -interva

Dec 15, 2022

Syno-cli - Synology unofficial API CLI and library

Synology CLI Unofficial wrapper over Synology API in Go. Focus on administrative

Jan 6, 2023
A lightweight but powerful OCR tool.
A lightweight but powerful OCR tool.

这个项目是什么? LOCR(Lightweight OCR)是一款轻量级的文字识别工具, 结合第三方截图工具, 可以快速的对图片文字进行识别。 为什么有这个项目 在日常学习的工作中, 难免会遇到一些文字的复制粘贴任务。但由于一些限制,我们无法复制想要的文字,只能一个字一个字的敲出来。而随着近几年OC

Nov 1, 2022
Go cmd util that prints cmd-line args with their index

echoidx This is an exercise of the book The Go Programming Language, by Alan A.

Dec 18, 2021
Json-match - Command line util for matching values in a JSON input

json-match Match JSON input by specifying key and value > json-match -json '{\"p

Jan 12, 2022
🐼 CLI client for images compressing using tinypng.com API
🐼 CLI client for images compressing using tinypng.com API

CLI tool for images compressing This tool uses tinypng.com API endpoint for compressing your local jpg/png images (it supports parallel jobs): API key

Jan 3, 2023
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.

Vaku Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine. Vaku extends the existing Vault CLI an

Nov 28, 2022
CLI for publishing/receiving CloudEvent messages through NATS

cenats CLI for publishing/receiving CloudEvent messages through NATS Use Case cenats is designed to make testing services that generate or consume eve

Nov 5, 2021
vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI

vkectl Introduction vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI(Command Line Interface). It is written in

Aug 26, 2022
Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Jan 13, 2022
A command-line interface for the Riak database through its HTTP API
A command-line interface for the Riak database through its HTTP API

Riakg Description Is a development oriented command line tool that enables navigation on buckets, keys and values of a Riak KV data store using it's H

Dec 31, 2022
CLI tool and library for generating a Software Bill of Materials from container images and filesystems
CLI tool and library for generating a Software Bill of Materials from container images and filesystems

A CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems. Exceptional for vulnerability dete

Jan 6, 2023