Last active
February 13, 2016 19:31
-
-
Save enisozgen/fcd91407ecafc12fc495 to your computer and use it in GitHub Desktop.
Quick script that convert image to text in GNOME
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Small script that works on GNOME as OCR to text | |
# Install | |
# sudo apt-get install tesseract-ocr | |
# sudo apt-get install xsel | |
# Usage | |
# Bound shortcut(Ctrl-Alt-Z) from GNOME settings | |
# Press (Ctrl-Alt-Z) | |
# Select area | |
# Paste to editor | |
cd /tmp/ | |
rm temp.png | |
gnome-screenshot -a --file=temp.png | |
tesseract temp.png output ; cat output.txt | xsel -bi ; rm output.txt | |
exit 1 | |
# Known bugs | |
# Sometimes it's necessary to press (Ctrl-Alt-Z) few times |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment