- Rewrite intro to describe the single universal prompt (no per-page detection)
- Remove the Document Types table and --type references
- Add --ctx and --timeout usage examples
- Add an Options table documenting every flag and default, including --poppler
- Fix output-format example to drop the removed Type label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
## Summary
- Accept `.jpg`, `.jpeg`, and `.png` files in addition to `.pdf`
- Images are loaded directly via Pillow — no poppler required
- Unsupported extensions fail fast with a clear error message
- Output header uses "Image N" for images, "Page N" for PDFs
- `--dpi` and `--poppler` args apply to PDFs only (no behaviour change)
## Test plan
- [ ] Run on a JPEG scan and verify output is correct
- [ ] Run on a PNG and verify output is correct
- [ ] Run on a PDF and verify nothing regressed
- [ ] Pass an unsupported extension and verify the error message
Co-authored-by: Randa <obuvuyoviz26@gmail.com>
Reviewed-on: http://forgejo.localhost:3000/forgejo_admin/arabic-ocr/pulls/2
- Frame model as Arabic manuscript scholar with decades of experience
- Name specific script styles (نسخ، رقعة، ديواني، إجازة، كوفي) to activate deeper knowledge
- Instruct use of surrounding context to infer unclear words rather than skipping
- [؟] now only used when context-based reconstruction also fails
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace two-pass (detect + extract) with one call per page
- Single PROMPT handles all content: handwritten, IDs, tables, forms, printed text
- Remove --type flag, detect_type(), and PROMPTS dict
- Halves API calls and eliminates misclassification errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>