tetrak_ocr.batch¶
Batch OCR processor.
Scans the workspace/scans/ directory for supported image and PDF files, runs OCR on each one, writes the extracted text to a Markdown file in workspace/processed/, and moves the original file in alongside it.
- After processing, each file pair looks like:
- workspace/processed/
my-postcard.jpg ← original moved here my-postcard.md ← extracted text
- Usage (run from the repository root):
tetrak-ocr batch tetrak-ocr batch –backend auto-local tetrak-ocr batch –backend claude tetrak-ocr batch –backend tesseract –contrast 3.0
Functions
|
Return the OCR callable for the chosen backend. |
|
Parse arguments and process all supported files found in workspace/scans/. |
|
OCR a single file, write Markdown output, and move it to workspace/processed/. |
|
File extensions backend accepts. |
|
Transcribe image_path one page at a time, returning a text per page. |