OCR Hero CLI — AI-powered OCR for math, science, and technical documents
Project description
OCR Hero CLI
AI-powered OCR for math, science, and technical documents — from the command line.
Install
pip install ocrhero
Quick Start
# 1. Get your API key at https://ocrhero.com/developers
# 2. Login
ocrhero login --api-key ocrhero_sk_your_key_here
# 3. Process a single document
ocrhero process -i document.pdf -o output/
# 4. Batch process a folder
ocrhero batch -i ./documents/ -o ./results/
Commands
| Command | Description |
|---|---|
ocrhero login --api-key KEY |
Save your API key |
ocrhero logout |
Remove saved API key |
ocrhero whoami |
Check authentication status |
ocrhero process -i FILE |
Process a single document |
ocrhero batch -i DIR |
Batch process all files in a folder |
ocrhero jobs |
List recent processing jobs |
Options
# Output as Markdown only
ocrhero batch -i ./documents/ -o ./results/ -f md
# Output as Word document only
ocrhero batch -i ./documents/ -o ./results/ -f docx
# Both Markdown and Word (default)
ocrhero batch -i ./documents/ -o ./results/ -f both
# Merge all results into one file
ocrhero batch -i ./documents/ -o ./results/ --merge
| Option | Values | Default | Description |
|---|---|---|---|
-i, --input |
file or directory | required | Input file or folder |
-o, --output |
directory | . or ./results |
Output directory |
-f, --format |
md, docx, both | both | Output format |
--merge |
flag | off | Merge all results into one file |
Environment Variables
| Variable | Description |
|---|---|
OCRHERO_API_KEY |
API key (overrides saved config) |
OCRHERO_API_URL |
Custom API URL |
Supported Formats
PDF, JPG, JPEG, PNG, BMP, TIFF
Python SDK
from ocrhero.client import OCRHeroClient
client = OCRHeroClient(api_key="ocrhero_sk_...")
# Process and get result
result = client.process_and_wait("document.pdf")
print(result["text"])
# Download DOCX
job = client.process("document.pdf")
client.wait_for_completion(job["job_id"])
client.download_docx(job["job_id"], "output.docx")
Links
- Website: https://ocrhero.com
- Developers: https://ocrhero.com/developers
- Support: support@ocrhero.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ocrhero-0.1.0.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ocrhero-0.1.0.tar.gz.
File metadata
- Download URL: ocrhero-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90942ef1c48711fc36dd73e616b998b5c14529e8de094007cc8e7c1ad70fda50
|
|
| MD5 |
4fe24d90f15ae2eb025f3528c513a864
|
|
| BLAKE2b-256 |
4b2e0721c274925a4fab1aea887870bb90f8e1de74b19f3381475b55301334e8
|
File details
Details for the file ocrhero-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ocrhero-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76e4f56b5f2d244f9b0c8e628744d56ba2499e77745dacfe1ea2042f5c7eaba7
|
|
| MD5 |
662bbd0c899e64eea1b917b0b62a4f38
|
|
| BLAKE2b-256 |
054123477e7787bf0188912f1981ae41028eb0fa613cc3dacf7ab5922b91618c
|