Created
December 22, 2020 06:47
-
-
Save Rudo2204/ce65b7f3549a95721100e26631c9302f to your computer and use it in GitHub Desktop.
scrot into tesseract, copy to clipboard
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 scrot | |
#select tesseract_lang in jpn jpn_vert ;do break;done | |
# Quick language menu, add more if you need other languages. | |
SCR_IMG=`mktemp` | |
trap "rm $SCR_IMG*" EXIT | |
scrot -s $SCR_IMG.png -q 100 | |
tesseract -l jpn_vert $SCR_IMG.png $SCR_IMG &> /dev/null | |
sed '$ s/.$//' $SCR_IMG.txt | xclip -sel clip | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment