Skip to content

Instantly share code, notes, and snippets.

@jonbartlett
Last active May 28, 2018 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbartlett/1b28a2bcd09397b74b79ed43f8781177 to your computer and use it in GitHub Desktop.
Save jonbartlett/1b28a2bcd09397b74b79ed43f8781177 to your computer and use it in GitHub Desktop.
Scan and OCR Solution

What you'll need:

Solution:

  • EPSON Connect Cloud Scan setup to scan to PDF and place file in a Dropbox folder
  • Automator script to watch "Inbox" and invoke OCR Kit with "Run Shell Script" (set "Pass Input" = "as arguments")
now=$(date +"%Y%m%d")
echo $now
for f in "$@"
do
    echo "$f"
    filename=$(basename "$f")
    echo "$filename"
    new_filepath="/Users/jon/Documents/Share/ClaireandJon/Filing Cabinet/To-File/${now}_$filename"
    echo "$new_filepath"
    /Applications/OCRKit.app/Contents/MacOS/OCRKit \
    --lang en \
    --format pdf \
    --output "$f" "$f"
    mv "$f" "$new_filepath"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment