Advertisement
constantin-net

.bin/scrot-ocr.sh

Jul 31st, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #!/bin/bash
  2. #tesseract-ocr tesseract-ocr-eng
  3. #psm is
  4. #7 = Treat the image as a single text line.
  5. #8 = Treat the image as a single word.
  6. #9 = Treat the image as a single word in a circle.
  7. #10 = Treat the image as a single character.
  8. scrot -s -z -e 'tesseract $f /tmp/screenshot_ocr -l eng -psm 7 && cat /tmp/screenshot_ocr.txt | tr -s " ",",","!","?",".","-","—" "\n" > /tmp/sub && /bin/bash ~/.bin/words.sh "from scrot"' > /dev/null 2>&1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement