Created
August 9, 2022 07:25
-
-
Save mrflobow/3f40d34b34d1f9748b61e2f827c6145f to your computer and use it in GitHub Desktop.
Hazel - Trigger OCRKit
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
#!/bin/zsh | |
ocrkit=/Applications/OCRKit.app/Contents/MacOS/OCRKit | |
filename=$(basename -- "$1") | |
new="/Users/YOURUSER/Scans/OCR/$filename" | |
$ocrkit --lang de --format pdf --no-progress --output "$new" "$1" | |
if [ $? -eq 0 ]; then | |
echo "OK" | |
echo "Remove $1" | |
rm "$1" | |
else | |
echo "FAIL" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment