From ee2930e9bf3e5253fe5a43fc96db429204f68d41 Mon Sep 17 00:00:00 2001 From: Til Blechschmidt Date: Fri, 1 Mar 2019 12:52:01 +0100 Subject: [PATCH] Added rudimentary epub support --- .build/FlagsEPUB.txt | 1 + build.sh | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 .build/FlagsEPUB.txt diff --git a/.build/FlagsEPUB.txt b/.build/FlagsEPUB.txt new file mode 100644 index 0000000..d037a7b --- /dev/null +++ b/.build/FlagsEPUB.txt @@ -0,0 +1 @@ +-t epub diff --git a/build.sh b/build.sh index 9169a6c..b3248c3 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,7 @@ OUTPUT_FILE="${OUTPUT_FOLDER}/main" PANDOC_INPUT="src/*.md" FLAGS_PANDOC=$(cat .build/FlagsGeneral.txt) FLAGS_PDF="${FLAGS_PANDOC} $(cat .build/FlagsPDF.txt)" +FLAGS_EPUB="${FLAGS_PANDOC} $(cat .build/FlagsEPUB.txt)" FLAGS_HTML="${FLAGS_PANDOC} $(cat .build/FlagsHTML.txt)" FLAGS_PLAINTEXT="${FLAGS_PANDOC} $(cat .build/FlagsPlaintext.txt)" @@ -31,6 +32,9 @@ build() { html) pandoc ${PANDOC_INPUT} ${FLAGS_HTML} -o "${OUTPUT_FILE}.html" ;; + epub) + pandoc ${PANDOC_INPUT} ${FLAGS_EPUB} -t epub -o "${OUTPUT_FILE}.epub" + ;; *) echo -e "\r\033[1A\033[0KInvalid target: '${TARGET}'" return -1