- Features
- Prerequisites
- Installation
- Usage
- Hotkey Setup
- Troubleshooting
- File Overview
- Contributing
- License
- Fast screenshot-to-text via Flameshot
- OCR powered by Tesseract v5+ with LSTM neural engine
- Enhanced OCR quality with smart preprocessing and multiple detection modes
- Multiple OCR attempts using different page segmentation modes for better accuracy
- Smart image enhancement that preserves text quality instead of over-processing
- Automatic clipboard copy (
xcliporxsel) - Detailed notifications with character and word count
- Simple hotkey integration
- Python 3.6 or newer
- Flameshot
- Tesseract OCR with language data
xcliporxselfor clipboard- Ensure
~/.local/binis in your$PATH
git clone https://github.com/rpriven/xclip-ocr.git
cd xclip-ocr
python3 install.pyVerifies and installs system dependencies, then copies
xclip-ocr.pyto~/.local/bin.
Run the script and select a screen region:
xclip-ocr.py
# Select with Flameshot, then Enter → OCR & clipboard copy- Cinnamon (auto-installed): Super + Shift + T bound by
install.py. - Manual (any DE):
- Command:
python3 $HOME/.local/bin/xclip-ocr.py - Shortcut: your preferred key combo
- Command:
- No text? Ensure clear text, install
tesseract-ocrand language files. - Clipboard issues? Verify
xclip/xsel, check$DISPLAY, inspect/tmp/xclip-ocr-debug.txt&error.log.
| File | Description |
|---|---|
xclip-ocr.py |
Main OCR script |
install.py |
Dependency & hotkey setup |
README.md |
Project documentation |
Issues & PRs: https://github.com/rpriven/xclip-ocr/issues
MIT — see LICENSE