I created a .sh script for simple OCR-ing of screenshots that I make with Shutter.
The script looks like this (
#!/bin/bash convert $1 /tmp/output.pnm cat /tmp/output.pnm | pamstretch 4 > /tmp/stretched.pnm convert /tmp/stretched.pnm -colorspace gray /tmp/output600dpi.tif tesseract /tmp/output600dpi.tif ./outputText -l eng
This script does some image enhancing that is required when OCRing with tesseract.
It does the job properly if it is called from the terminal. What I wanted was to do the whole process within Nemo, so I created a custom action named
/home/user1/.local/share/nemo/actions with the following content:
[Nemo Action] Name=OCR The Screenshoot Comment=OCR Function for Nemo File Manager Exec=<ocrFile.sh %F> Icon-Name=gtk-execute Selection=Any Extensions=png;
This Nemo action don't produce output with the script given above. The .sh script is also in the folder for Nemo's custom actions.