- Notifications
You must be signed in to change notification settings - Fork4
A simple utility to automatically extract text from spectacle on plasma desktops
License
funinkina/spectacle-ocr-screenshot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A simple Qt application that integrates KDE Spectacle screenshot tool with Tesseract OCR to extract text from screenshots as well QR codes.
- 📷 Capture screenshots using KDE's Spectacle tool
- 🔍 Extract text from screenshots using Tesseract OCR
- 📱 Decode QR codes from screenshots
- 💻 Display extracted text in a user-friendly interface
- 🌍 Support for multiple languages
- ✏️ Edit extracted text before saving
- 📋 Copy text to clipboard
- 💾 Save text to file
- 🖼️ Save the screenshot as .png
- Qt 6.x
- Tesseract OCR
- Leptonica
- KDE Spectacle
- Zxing (for QR code decoding)
Get the binaries from:Releases Page.
Run the application:
./spectacle-ocr-screenshot
Tip
Create a symlink to the executable in your localPATH
for easy access:
sudo ln -s spectacle-ocr-screenshot /usr/local/bin/
Then you can run the application from anywhere using or by assigning a keyboard shortcut tospectacle-ocr-screenshot
- Launch Spectacle in region selection mode
- After capturing, click on save, this will save to
/tmp
- The extracted text will be displayed in the application window
- You can edit the text, copy it to clipboard or save it to a file
--lang <language>
: Specify the language(s) for OCR (default: eng)- Use ISO 639-3 language codes
- For multiple languages, join them with '+' (e.g.,
--lang eng+hin
for English and Hindi)
--disable-qr
: Disable QR code detection
# Use English OCR (default)./spectacle-ocr-screenshot# Use German OCR./spectacle-ocr-screenshot --lang deu# Use multiple languages (English and Spanish)./spectacle-ocr-screenshot --lang eng+spa
Tesseract OCR supports many languages. Some common language codes:
eng
- Englishdeu
- Germanhin
- Hindi
git clone https://github.com/yourusername/spectacle-ocr-screenshot.gitcd spectacle-ocr-screenshot
For Arch Linux:
sudo pacman -S qt6-base tesseract leptonica spectacle
For Ubuntu/Debian:
sudo apt install qt6-base-dev tesseract-ocr libleptonica-dev kde-spectacle
For Fedora:
sudo dnf install qt6-qtbase tesseract leptonica spectacle
git clone https://github.com/funinkina/spectacle-ocr-screenshotqmake6 simple.promake
Make sure you have cmake installed!
mkdir build&&cd buildcmake ..make
Note
You may need to install language packs for Tesseract OCR separately.
About
A simple utility to automatically extract text from spectacle on plasma desktops
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.