summaryrefslogtreecommitdiff
path: root/extras/mkdjvu.sh
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2012-02-02 00:34:03 +0000
committerNick White <git@njw.me.uk>2012-02-02 00:34:03 +0000
commite1fada376c4b883d53d6293babb899aa1c510b65 (patch)
tree2e2d1be58e561060215f10dbdc2455d213ee1280 /extras/mkdjvu.sh
parent3f408e55b4ce41f0e6dc2bab37384e3a29fe1808 (diff)
Add djvu creation scripts
Diffstat (limited to 'extras/mkdjvu.sh')
-rw-r--r--extras/mkdjvu.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/extras/mkdjvu.sh b/extras/mkdjvu.sh
new file mode 100644
index 0000000..6e89235
--- /dev/null
+++ b/extras/mkdjvu.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# See COPYING file for copyright and license details.
+#
+# Makes a DjVu
+# Requires imagemagick and djvulibre
+
+test $# -ne 1 && echo "Usage: $0 bookdir" && exit 1
+cd "$1" || exit 1
+
+for i in `ls`
+do
+ echo "$i"
+
+ convert "$i" "$i.ppm"
+ c44 "$i.ppm" "$i.djvu"
+
+ rm -f "$i.ppm"
+done
+
+djvm -c book.djvu *.djvu
+
+rm -f [0-9]*djvu
+
+echo "$1/book.djvu"