Settings and activity
6 results found
-
89 votesmc23646266 supported this idea ·
-
12 votes
I’ve still to get my head around services, but thank you, that would be a nice integration
An error occurred while saving the comment An error occurred while saving the comment mc23646266 commentedare 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. -
98 votes
An error occurred while saving the comment mc23646266 commentedare 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.mc23646266 supported this idea · -
4 votesmc23646266 shared this idea ·
-
32 votes
Too be frank, I’d like to get English working better first, but I’ll look at this then.
mc23646266 supported this idea · -
22 votesmc23646266 supported this idea ·
# 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"
fi
rm -f "$myFILE"