This POSIX shell script triggers a screenshot tool to select an area, OCRs the content, and finally, copies the result to the clipboard.
Tesseract OCR is a must-have without alternatives.
Supported Screenshot tools:
- Make Image (maim)
- SCReenshOT (scrot)
- GNOME Screenshot (gnome-screenshot)
- Shutter (shutter)
- XFCE4 screenshooter
Supported Clipboard tools:
Optional tools:
- Imagemagick (mogrify) for optimizing the screenshot before OCR
- libnotify (notify-send) for status notifications
Download the script to any location in $PATH and chmod +x
With curl:
curl -L -o "$HOME/.local/bin/grab-text" https://raw.githubusercontent.com/benweidig/grab-text/main/grab-text
chmod +x "$HOME/.local/bin/grab-text"With wget:
wget -O "$HOME/.local/bin/grab-text" https://raw.githubusercontent.com/benweidig/grab-text/main/grab-text
chmod +x "$HOME/.local/bin/grab-text"MIT. See LICENSE
