Created
October 23, 2015 19:49
-
-
Save AABoyles/c45fe8c564d0d160e22f to your computer and use it in GitHub Desktop.
Run this, select a screen region with some un-copyable text, and paste it like normal text.
This file contains hidden or 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 | |
# Dependencies: tesseract-ocr imagemagick scrot xsel | |
SCR_IMG=`mktemp` | |
trap "rm $SCR_IMG*" EXIT | |
scrot -s $SCR_IMG.png | |
mogrify -modulate 100,0 -resize 400% $SCR_IMG.png #should increase detection rate | |
tesseract $SCR_IMG.png $SCR_IMG &> /dev/null | |
cat $SCR_IMG.txt | xsel -bi | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment