summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-04-07 23:55:15 +0100
committerLars Wirzenius <liw@liw.fi>2012-04-07 23:55:15 +0100
commit0d2e565a592cfcaa4ba9c1b9701172d9338076ec (patch)
tree0e10c1baca35c0bf8d287910e1278bed9a398dbe /Makefile
parentb55193af31d15ac6a87f5035d599a422674901d9 (diff)
downloadgtdfh.liw.fi-0d2e565a592cfcaa4ba9c1b9701172d9338076ec.tar.gz
Add cover image to ebooks
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 343e0c2..ca551f8 100644
--- a/Makefile
+++ b/Makefile
@@ -22,15 +22,19 @@ all: book.pdf book.epub book.mobi
book.pdf: $(chapters)
markdown2pdf --toc -o book.pdf $(chapters)
-book.epub: $(chapters)
- pandoc -t epub --epub-metadata=book.xml -o book.epub $(chapters)
+book.epub: $(chapters) cover.png
+ pandoc -t epub --epub-metadata=book.xml --epub-cover=cover.png \
+ -o book.epub $(chapters)
book.mobi: book.epub
ebook-convert book.epub book.mobi
+cover.png: cover.svg
+ inkscape -e cover.png cover.svg
+
count:
wc -w $(chapters)
echo 100 '*' $$(cat $(chapters) | wc -w) / 30000 | bc -l
clean:
- rm -f book.pdf book.html book.epub book.mobi
+ rm -f book.pdf book.html book.epub book.mobi cover.png