chore: jptesseract now behaves as expected

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-03-03 20:23:28 -06:00
parent 34ba3e8987
commit 0bd5e02534
1 changed files with 4 additions and 4 deletions

View File

@ -21,8 +21,8 @@ cd /tmp/jptesseract || exit;
# Screenshot with flameshot, save to /tmp directory
if flameshot gui -d "$DELAY" -r --path /tmp/jptesseract/.useless > /tmp/jptesseract/jp_text_image.png; then
# Read from /tmp directory with Tesseract
tesseract -l jpn /tmp/jptesseract/jp_text_image.png /tmp/jptesseract/jp_output
# Take output and send it to the clipboard
xclip -selection clipboard < /tmp/jptesseract/jp_output.txt;
tesseract -l jpn -c preserve_interword_spaces=1 /tmp/jptesseract/jp_text_image.png /tmp/jptesseract/jp_output
# Remove \f which will be present at the end of jp_output
tr -d '\f' < /tmp/jptesseract/jp_output.txt | xclip -selection clipboard;
fi