Command line reference

Every subcommand and flag, generated from the parser. For what the flags are for, see using the command line.

Command line entry point.

usage: tetrak-ocr [-h] {backends,ocr,batch,evaluate} ...

Positional Arguments

command

Possible choices: backends, ocr, batch, evaluate

Sub-commands

backends

list backends and whether they are installed

tetrak-ocr backends [-h]

ocr

OCR a single file

tetrak-ocr ocr [-h]
               [--backend {tesseract,tesseract-auto,claude,easyocr,easyocr-hy,paddle,paddle-vl,marker,vision,auto-local}]
               [--output OUTPUT] [--contrast FACTOR] [--psm MODE] [--auto]
               [--with-paddle-vl] [--format FORMAT] [--pdf [PATH]]
               [--pdf-full-size] [--pdf-font PATH]
               path

Positional Arguments

path

image or PDF to transcribe

Named Arguments

--backend

Possible choices: tesseract, tesseract-auto, claude, easyocr, easyocr-hy, paddle, paddle-vl, marker, vision, auto-local

Default: 'tesseract'

--output

write to this file instead of stdout

--contrast

Contrast factor for Tesseract (default: 2.0); try 3.0 for faded originals.

--psm

Tesseract page segmentation mode (default: 3). 3=auto, 6=block, 11=sparse.

--auto

Auto-configure Tesseract contrast and PSM per image.

Default: False

--with-paddle-vl

Add PaddleOCR-VL to the auto-local pool. It measures as the strongest local backend and wins where the rest of the pool is weakest, but costs minutes per page rather than seconds, so it is opt-in. Needs the paddle-vl extra; ignored by every other backend, which you name directly instead.

Default: False

--format, -f

output format to write, repeatable or comma-separated. Choose from: markdown, text, pdf. Defaults to markdown.

--pdf

shorthand for adding ‘pdf’ to –format: the scan with the transcript embedded as an invisible text layer, which is what makes it indexable in Preservica, CONTENTdm, Omeka and AtoM

Default: False

--pdf-full-size

embed the source image untouched instead of a downsampled access copy. Implies –pdf. Larger files; use when the PDF is the deliverable rather than a derivative

Default: False

--pdf-font

TrueType font for the text layer. Only needed for scripts the built-in font cannot encode; without one, such a transcript is refused rather than written as black boxes

batch

process everything in workspace/scans/

tetrak-ocr batch [-h]
                 [--backend {tesseract,tesseract-auto,claude,easyocr,easyocr-hy,paddle,paddle-vl,marker,vision,auto-local}]
                 [--quality-gate] [--dry-run] [--telemetry PATH]
                 [--no-telemetry] [--contrast FACTOR] [--psm MODE] [--auto]
                 [--with-paddle-vl] [--format FORMAT] [--pdf [PATH]]
                 [--pdf-full-size] [--pdf-font PATH]

Named Arguments

--backend

Possible choices: tesseract, tesseract-auto, claude, easyocr, easyocr-hy, paddle, paddle-vl, marker, vision, auto-local

Default: 'tesseract'

--quality-gate

divert transcripts below the quality threshold to workspace/triage/ (needs the qa extra; English-only scoring, skipped for other scripts)

Default: False

--dry-run

list what would be processed, without running OCR or moving anything

Default: False

--telemetry

run log to append to (default: workspace/telemetry.jsonl); one JSON object per line, tail it to watch a long batch

--no-telemetry

do not write the run log

Default: False

--contrast

Contrast factor for Tesseract (default: 2.0); try 3.0 for faded originals.

--psm

Tesseract page segmentation mode (default: 3). 3=auto, 6=block, 11=sparse.

--auto

Auto-configure Tesseract contrast and PSM per image.

Default: False

--with-paddle-vl

Add PaddleOCR-VL to the auto-local pool. It measures as the strongest local backend and wins where the rest of the pool is weakest, but costs minutes per page rather than seconds, so it is opt-in. Needs the paddle-vl extra; ignored by every other backend, which you name directly instead.

Default: False

--format, -f

output format to write, repeatable or comma-separated. Choose from: markdown, text, pdf. Defaults to markdown.

--pdf

shorthand for adding ‘pdf’ to –format: the scan with the transcript embedded as an invisible text layer, which is what makes it indexable in Preservica, CONTENTdm, Omeka and AtoM

Default: False

--pdf-full-size

embed the source image untouched instead of a downsampled access copy. Implies –pdf. Larger files; use when the PDF is the deliverable rather than a derivative

Default: False

--pdf-font

TrueType font for the text layer. Only needed for scripts the built-in font cannot encode; without one, such a transcript is refused rather than written as black boxes

evaluate

benchmark backends against the evaluation corpus

tetrak-ocr evaluate

evaluate’s flags

evaluate uses add_help=False and forwards its arguments verbatim to evaluation.ocr.harness, which builds its argparse.ArgumentParser inline inside main() rather than in a reusable function – there is nothing here for sphinx-argparse to introspect for that one subcommand. Documented by example instead:

tetrak-ocr evaluate --backend tesseract-auto
tetrak-ocr evaluate --all --save