File: xpaint_ocr

package info (click to toggle)
xpaint 2.9.1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,552 kB
  • sloc: ansic: 73,017; sh: 492; yacc: 247; lex: 126; sed: 43; makefile: 10
file content (25 lines) | stat: -rwxr-xr-x 720 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Copyright 2007, J.-P. Demailly <demailly@fourier.ujf-grenoble.fr>
# Licence : GPLv3

# adapt to whatever OCR engine you prefer
if test `which cuneiform` != ""
then
   cuneiform -l eng $HOME/xpaint_output.ppm -o $HOME/xpaint_ocr_output.txt
elif test `which ocrad` != ""
then
   ocrad $HOME/xpaint_output.ppm >> $HOME/xpaint_ocr_output.txt
else
   echo -e "ocrad/cuneiform engines not available !!\n\
Please adapt the 'xpaint_ocr' script to the preferred OCR engine." \
        > $HOME/xpaint_ocr_output.txt
fi

# adapt to whatever X pager or X editor is available
# we strongly recommend good old 'xless' ...
#

x-terminal-emulator -e sensible-editor xpaint_ocr_output.txt &

rm -f $HOME/xpaint_output.ppm