From b276de40496780fbfde73d104b811493e39eb673 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 17 Jul 2011 15:04:23 +0100 Subject: Add a script plus css file for making a PDF of the book. --- markdown-to-pdf | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 markdown-to-pdf (limited to 'markdown-to-pdf') diff --git a/markdown-to-pdf b/markdown-to-pdf new file mode 100755 index 0000000..732a456 --- /dev/null +++ b/markdown-to-pdf @@ -0,0 +1,44 @@ +#!/bin/sh + +set -e + +book_prelude() +{ + cat < + +Book + + + +eof +} + +book_end() +{ + cat < + +eof +} + +chapter() +{ + cat < +eof + + markdown "$1" + + cat < +eof +} + +(book_prelude +for f in "$@" +do + chapter "$f" +done +book_end) > book.html +wkhtmltopdf book.html book.pdf -- cgit v1.2.1