Page 1 of 1

tesseract

PostPosted: Tue Jun 05, 2012 3:14 pm
by La_Tristesse
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:
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:

Image

Any help would be appreciated.

Regards,

Tristan

Re: tesseract

PostPosted: Thu Jun 07, 2012 5:39 pm
by Mr_Noodle
The logs may have more info but my guess is that you are not using full paths for the different programs you are calling. Remember that Hazel executes scripts in a non-interactive environment so you won't have the environment variables set that you would with an interactive shell.