2 ms·
Another variant of the scripts floating around that I've been using to scratch the same itch: #!/bin/bash # Performs Optical Character Recognition (OCR) on
by dobicinaitis 3y ago
Another variant of the scripts floating around that I've been using to scratch the same itch:
#!/bin/bash
# Performs Optical Character Recognition (OCR) on a freely chosen
# screen area and copies the recognized text to the clipboard.
#
# Dependencies: sudo apt install gnome-screenshot tesseract-ocr xclip
IMAGE_FILE="/tmp/ocr.png"
gnome-screenshot --area --file "$IMAGE_FILE"
tesseract "$IMAGE_FILE" - | xclip -rmlastnl -selection clipboard
rm -f "$IMAGE_FILE"