From time to time I have the need to get text from an image, when someone shares a screen-shot, but not the URL in it or when I want to copy code from a stopped youtube video. So ideally I want to select a region of my screen and turn that into text.
#!/bin/sh rxvt -e sh -c "gocr -i \"$1\" | vim -"
Then create a "desktop" entry for
flameshot to pick up.
[Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=.../bin/ocr %f Name=OCR Categories=Graphics;
(Note, that the path there is absolute, or you have to figure out, what works for you... I couldn't be bothered to look into this)
flameshot gui (I have that on my
select the region to OCR, press
CTRL-o (or click the button to open
the screenshot with an application), then pick the OCR-Application from
the desktop entry, which then opens the text.