New chapters, Add ToC, fix Docker

This commit is contained in:
Nemo 2020-06-13 20:43:16 +05:30
parent fd98e1bb1e
commit 725bcc93a5
3 changed files with 7 additions and 6 deletions

View File

@ -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/

View File

@ -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

View File

@ -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