π¦ ClawHub
claw-text-and-pics
by @photon78
Extract text and embedded images from scanned documents, PDFs, and photos via Mistral OCR API. Use when reading receipts, invoices, contracts, handwritten no...
β‘ When to Use
π‘ Examples
# Extract text only
python3 ocr.py --input scan.jpgExtract text from PDF (3 pages)
python3 ocr.py --input document.pdf --pages 3Extract embedded images
python3 ocr.py --input scan.jpg --extract-images --output-dir ./images/Extract images and send to Telegram
python3 ocr.py --input scan.jpg --extract-images --send --target 123456789Works with URLs too
python3 ocr.py --input https://example.com/document.pdf
βοΈ Configuration
Set in ~/.openclaw/.env or as environment variables:
| Variable | Required | Description |
|----------|----------|-------------|
| MISTRAL_API_KEY | Yes | Your Mistral API key |
| TELEGRAM_BOT_TOKEN | Only for --send | Your Telegram bot token |
| TELEGRAM_CHAT_ID | Optional | Default chat ID (overridable with --target) |
TERMINAL
clawhub install claw-text-and-pics