Permalink
Browse files

generate mobile e-books: .mobi and .epub

  • Loading branch information...
1 parent cfb6a56 commit 41d5aa470d9e22f4691a340433122dfcaf33a732 @avsej committed Oct 12, 2010
View
@@ -0,0 +1,28 @@
+# You need calibre installed (http://calibre-ebook.com/)
+
+STYLESHEET=/usr/share/xml/docbook/stylesheet/docbook-xsl/xhtml/docbook.xsl
+
+all: book.mobi book.epub clean
+
+book.epub: book.html
+ ebook-convert $^ $@ \
+ --level1-toc //h:h1 \
+ --level2-toc //h:h2 \
+ --level3-toc //h:h3 \
+ --language en
+
+book.mobi: book.html
+ ebook-convert $^ $@ \
+ --level1-toc //h:h1 \
+ --level2-toc //h:h2 \
+ --level3-toc //h:h3 \
+ --language en
+
+book.html: book.xml
+ xsltproc --output $@ $(STYLESHEET) $^
+
+clean:
+ rm -f book.html
+
+.PHONY: all
+
View
Binary file not shown.
View
Binary file not shown.
View
View

0 comments on commit 41d5aa4

Please sign in to comment.