Add as a service in Snow Leopard
From the services menu it would be useful from say preview to be able to send to VelOCRaptor
I’ve still to get my head around services, but thank you, that would be a nice integration
-
Cool. I'm busy on another project for a while, but I will look into this
-
mc23646266 commented
# dirtiy coding ahead! be careful
myBIN=~/My\ Applications/VelOCRaptor.app/Contents/SharedSupport/velocraptor.rb# convert to 300d3ddpi temorarilyo
myFILE="${TMPDIR}$(basename "$1")"
myWIDTH=$(sips -g pixelWidth "$1"| tail -1| cut -d: -f2)
sips -s dpiWidth 300 -s dpiHeight 300 --resampleWidth $(($myWIDTH *300 /72)) "$1" --out "$myFILE"if [[ ${1##*.} != "pdf" ]]
then
"$myBIN" "$myFILE" "${1%.*}.pdf"
fi"$myBIN" "$myFILE" "${1%.*}.txt"
## use this for tagging, if you like
if [[ -r "$2" ]]
then
myCOMMENT=$( head -1 "$2"| tr '[:upper:]' '[:lower:]' )
if [[ ${1#*.} != "pdf" ]]
then
openmeta -s $myCOMMENT -m Y -p "${1%.*}.pdf"
fi
openmeta -s $myCOMMENT -p "${1%.*}.txt"
openmeta -s $myCOMMENT -p "$1"
firm -f "$myFILE"
-
mc23646266 commented
are you using 10.6? if so, create a service(dienste) for ocr'ing screengrabs.
i choose a shellscript for my solution, with 'sips' scaling the screenshots,
to temporary 300dpi, reading once a pdf then reading a txt.
the txt gives very varying results.
some are excellent,
some terrible.