-
-
Save AABoyles/2a38410a6eb3ec8f7250 to your computer and use it in GitHub Desktop.
scripts
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
#!/usr/bin/env 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