Script to generate PDF and EPUB for "The Ickabog" by J.K Rowling
Go to file
Nemo b26feca920 Revert "The book is complete"
This reverts commit c45c604deb.

Rowling is writing beyond the promised 34 chapters
2020-06-18 15:50:16 +05:30
.dockerignore [docker] Adds Docker support 2020-06-09 18:41:29 +05:30
.gitignore Improve generation by adapting code from @lesensei 2020-06-09 18:09:00 +05:30
Dockerfile New chapters, Add ToC, fix Docker 2020-06-13 20:43:16 +05:30
LICENSE Adds cover art 2020-05-30 04:45:28 +05:30
README.md Revert "The book is complete" 2020-06-18 15:50:16 +05:30
cover.jpg Improve generation by adapting code from @lesensei 2020-06-09 18:09:00 +05:30
cover.ora Improve generation by adapting code from @lesensei 2020-06-09 18:09:00 +05:30
cover.pdf Improve generation by adapting code from @lesensei 2020-06-09 18:09:00 +05:30
generate.sh New chapters, Add ToC, fix Docker 2020-06-13 20:43:16 +05:30

README.md

ickabog-ebook

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.

Dependencies:

  • wget
  • pup and jq to parse input files
  • pandoc to generate EPUB and PDF files
  • qpdf to add cover to PDF files. (optional)
  • kindlegen or calibre installed to generate MOBI files. (optional)

How to run

Using Docker

mkdir out
docker run --volume `pwd`/out:/src/out captn3m0/ickabog-ebook

If you'd like to generate for a different language, use the following:

mkdir out

# Italiano
docker run --env LC="it" --volume `pwd`/out:/src/out captn3m0/ickabog-ebook

# English (US)
docker run --env LC="en-us" --volume `pwd`/out:/src/out captn3m0/ickabog-ebook

# España
docker run --env LC="es" --volume `pwd`/out:/src/out captn3m0/ickabog-ebook

# Français
docker run --env LC="fr" --volume `pwd`/out:/src/out captn3m0/ickabog-ebook

# Deutsch
docker run --env LC="de" --volume `pwd`/out:/src/out captn3m0/ickabog-ebook

# Português brasileiro
docker run --env LC="pt" --volume `pwd`/out:/src/out captn3m0/ickabog-ebook

Directly

./generate.sh

For generating ebooks for a different language, run the script with a LC parameter

LC=it ./generate.sh

Various values for LC are: it, en-us, es, fr, de, pt. If you don't pass a value, the default (en-GB) is used.

You should have ickabog.epub, and ickabog.pdf in the out directory after the script finishes.

  • If you have ConTeXt installed, you will also get a out/ickabog-large.pdf file with large fonts to be kid-friendly.
  • If you have qpdf installed, the PDF files will have cover pages
  • If you have calibre or kindlegen installed, a out/ickabog.mobi file will also be generated. Preference is given to kindlegen.

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 to get ickabog-large.pdf file. ~ConTeXt comes preinstalled in the Docker image, so that's the easiest way to get the same.~

Credits

The cover art is Avanyu by Julian Martinez. Used under Creative Commons license.

Julian Martinez, Avanyu, ca. 1923, watercolor, ink, and pencil on paper, Smithsonian American Art Museum, Corbin-Henderson Collection, gift of Alice H. Rossin, 1979.144.85

Code for internationalization and automatic chapter updates via @lesensei's fork.

Extra

A list of my other EBook generation projects: https://captnemo.in/ebooks/, includes a link to other related projects as well.

License

The little code in this repository is licensed under the MIT License. See LICENSE file for details.