diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 13 insertions, 21 deletions
@@ -1,24 +1,16 @@ -chapters = $(shell ./list-chapters index.mdwn) +SHELL = bash +TARGET = _ewww@web:/srv/http -all: book.pdf book.epub book.mobi +all: gtdfh.html -book.pdf: $(chapters) - pandoc -V geometry:a4paper --top-level-division=chapter \ - --toc -o book.pdf $(chapters) +gtdfh.html: index.mdwn gtdfh.css Makefile + pandoc -f markdown+implicit_figures --toc --self-contained -N \ + --metadata title="GTDFH" --metadata subtitle="Getting Things Done for Hackers" \ + -H <(echo "<style>"; cat gtdfh.css; echo "</style>") --standalone index.mdwn -o gtdfh.html -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 cover.png +publish: all + mkdir publish + cp -a gtdfh.html publish/index.html + cp gtdfh.css publish + rsync -a --del publish/. $(TARGET)/. + rm -r publish |