Syd OS: OCR pipeline for scanned/image-only PDFs
- ocrDocument.ts: rasterize with pdftoppm (150dpi, capped pages), transcribe with Claude vision (OCR_MODEL, default claude-haiku-4-5) - preserves chat screenshot structure (speaker/timestamp/message); persists documents.ocr_text and re-embeds so the doc becomes semantically searchable - read_document + embedDocument fall back to ocr_text when a PDF has no text layer; upload hook auto-OCRs new scanned uploads after embed finds no text - ocrBackfill.ts: batch-OCR existing docs with no chunks and no ocr_text Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Repository | emileriksenkeev/sydOS |
|---|---|
| Author | emileriksenkeev <emil@keev.co> |
| Authored | |
| Parents | 9aaaadc2 |
| Stats | 5 files changed , +271 , -7 |
| Part of | Text extraction and OCR hardening |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-1f74871f.md
from inside the repo you want the change in.