Created
January 22, 2018 17:45
-
-
Save ryanfeeley/7b451ac54b2f17151876387ba83e4b12 to your computer and use it in GitHub Desktop.
Shell Script for macOS Automator Workflow to OCR Images to Set Finder Comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in "$@" | |
do | |
/usr/local/bin/tesseract "$f" stdout | xargs -0 osascript -e 'on run {f, c}' -e 'tell app "Finder" to set comment of (POSIX file f as alias) to c' -e end "$f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment