tesseract

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

tesseract 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
La_Tristesse
 
Posts: 18
Joined: Sun Mar 21, 2010 4:42 pm

Re: tesseract 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.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support