tesseract

Hi there,
I'm trying to set up a folder with a rule in which every tif-file gets scanned by tesseract, will be renamed and then get optimized from pdfbeads. I wrote a little bash-script that runs fine, when executed from the commandline inside the folder, but for Hazel it won't work.
Here's the script:
My Hazel rule:

Any help would be appreciated.
Regards,
Tristan
I'm trying to set up a folder with a rule in which every tif-file gets scanned by tesseract, will be renamed and then get optimized from pdfbeads. I wrote a little bash-script that runs fine, when executed from the commandline inside the folder, but for Hazel it won't work.
Here's the script:
- Code: Select all
#! /bin/bash
for i in *tif; do tesseract $i $i -l deu hocr; done
/usr/local/bin/growlnotify -m Tesseract "Tesseract succeeded"
for i in *.tif.html; do mv "$i" "`basename $i .tif.html`.html"; done
/usr/local/bin/growlnotify -m Move "Filerenaming succeeded"
for i in *tif; do pdfbeads -b JP2 $i > $i.pdf; done
/usr/local/bin/growlnotify -m pdfbeads "pdfbeads succeeded"
My Hazel rule:

Any help would be appreciated.
Regards,
Tristan