Created
February 26, 2021 03:21
-
-
Save lens0021/9e331f3b908ada8c2e4bec045e1cdc30 to your computer and use it in GitHub Desktop.
screen-ts
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 | |
SCR_IMG=$(mktemp) | |
trap 'rm "$SCR_IMG"*' EXIT | |
scrot -s "${SCR_IMG}".png -q 100 | |
# increase quality with option -q from default 75 to 100 | |
mogrify -modulate 100,0 -resize 400% "${SCR_IMG}".png | |
# should increase detection rate | |
tesseract "${SCR_IMG}".png "${SCR_IMG}" -l jpn_vert &> /dev/null | |
cat "${SCR_IMG}.txt" | |
xsel -bi < "${SCR_IMG}.txt" | |
# zenity --info --text="$(cat "${SCR_IMG}.txt")" | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment