From 725bcc93a5f298cff1c11a65e265429538460ffe Mon Sep 17 00:00:00 2001 From: Nemo Date: Sat, 13 Jun 2020 20:43:16 +0530 Subject: [PATCH] New chapters, Add ToC, fix Docker --- Dockerfile | 4 ++-- README.md | 4 ++-- generate.sh | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a1c20c1..327124d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM pandoc/latex:latest WORKDIR /src -# RUN apk add bash git go jq qpdf ADD https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip /src/pup.zip ADD https://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v2_9.tar.gz /src/kindlegen/kindlegen.tar.gz @@ -14,7 +13,8 @@ RUN unzip pup.zip && \ mv kindlegen /usr/bin && \ cd .. && \ rm -rf kindlegen && \ - apk add --no-cache bash jq qpdf + apk add --no-cache bash jq qpdf texlive texlive-xetex && \ + context --generate COPY cover.pdf cover.jpg generate.sh /src/ diff --git a/README.md b/README.md index 4d093f5..27a5e5b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ickabog-ebook ![](https://img.shields.io/badge/Chapters%20Published-21%2F34-brightgreen) +# ickabog-ebook ![](https://img.shields.io/badge/Chapters%20Published-29%2F34-brightgreen) Generates ebooks for The Ickabog by J.K Rowling. Original text from https://www.theickabog.com/. Since the book is still being published, please consider this "in-progress". Supports all 7 languages. @@ -61,7 +61,7 @@ You should have `ickabog.epub`, and `ickabog.pdf` in the `out` directory after t ## Known Issues -The PDF is optimized for few pages of printing, so has a small font size by default. If you'd like a kid-friendly version, [install context][context] to get `ickabog-large.pdf` file. ConTeXt comes preinstalled in the Docker image, so that's the easiest way to get the same. +The PDF is optimized for few pages of printing, so has a small font size by default. If you'd like a kid-friendly version, [install context][context] to get `ickabog-large.pdf` file. ~ConTeXt comes preinstalled in the Docker image, so that's the easiest way to get the same.~ ## Credits diff --git a/generate.sh b/generate.sh index ed976af..0297d41 100755 --- a/generate.sh +++ b/generate.sh @@ -75,6 +75,7 @@ pandoc --from=html \ --pdf-engine=xelatex \ --metadata title="$MAIN_TITLE" \ --metadata author="J.K Rowling" \ + --toc \ --output="$OUTPUT_DIR/ickabog-no-cover.pdf" \ -V lang="$LANG" \ -V geometry=margin=1.5cm \ @@ -109,6 +110,6 @@ if command -v context>/dev/null; then else mv "$OUTPUT_DIR/ickabog-no-cover.pdf" "$OUTPUT_DIR/ickabog-large.pdf" fi -fi -echo "[+] Generated PDF using context: $OUTPUT_DIR/ickabog-large.pdf" + echo "[+] Generated PDF using context: $OUTPUT_DIR/ickabog-large.pdf" +fi