summaryrefslogtreecommitdiff
path: root/extras/mkocrpdf.sh
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2011-12-03 18:18:12 +0000
committerNick White <git@njw.me.uk>2011-12-03 18:18:12 +0000
commit9239c8747aa79b95ae87b61b5758d089040d0616 (patch)
treeb037a36a58c38f278a1bfd57938b48e61276a04a /extras/mkocrpdf.sh
parentaa4c9f8df45a9a6881e0a90e50a7f1359ac5d1e1 (diff)
Have extras scripts take jpgs into account, and change their usage slightly
Diffstat (limited to 'extras/mkocrpdf.sh')
-rw-r--r--extras/mkocrpdf.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/extras/mkocrpdf.sh b/extras/mkocrpdf.sh
index 1ec9a06..9d281db 100644
--- a/extras/mkocrpdf.sh
+++ b/extras/mkocrpdf.sh
@@ -9,9 +9,12 @@
# script does that, then reduces the results back down
# to create a reasonable size PDF.
+test $# -ne 1 && echo "Usage: $0 bookdir" && exit 1
+cd "$1" || exit 1
+
echo 'tessedit_create_hocr 1' > hocr
-for i in `ls *png`
+for i in `ls`
do
echo "$i"
@@ -42,8 +45,8 @@ do
rm -f "$i.big.tif" "$i.big.tif.html" "$i.html"
done
-echo book.pdf
-
# cat the pdf pages together
pdftk *pdf cat output book.pdf
rm -f [0-9]*pdf hocr
+
+echo "$1/book.pdf"