Skip to content

Generate an ePub book from a simple plaintext descriptor

License

Notifications You must be signed in to change notification settings

nabijaczleweli/gen-epub-book

Repository files navigation

Generate an ePub book from a simple plaintext descriptor.

Quickstart

Copy this somewhere:

Name: Simple ePub demonstration
Cover: cover.png

Image-Content: simple/chapter_image.png
Content: simple/ctnt.html

Author: nabijaczleweli
Date: 2017-02-08T15:30:18+01:00
Language: en-GB

Modify to your liking, then, assuming you put the file in "example/test.epupp" and want to write the result to "out/test.epub", run:

echo -e "Self: example/test.epupp\nOut: out/test.epub" | cat - example/test.epupp | \
  awk gen-epub-book.awk -v temp="$TEMP

For more detailed usage information and tag list, see the manpage, and for a full guide see the webpage.

AWK support

AWK version Supported
GAWK 👍
MAWK 👎

Other versions untested, open an issue if you want one.

Dependencies

A supported AWK version, obviously. The built-in should suffice on Linux, but gawk on APT and MSYS2 will work.

Info-ZIP, a.k.a. zip on both APT and MSYS2.

If you want to build the examples, you need Calibre.

Why?

There really are no good alternatives and I wanted soemthing automated to be able to deploy this to a webpage so I could download stuff to my Kindle.

Also, why not?

Versions in other languages

A rewrite in Rust.
A rewrite in C++.
A rewrite in Scala.
A rewrite in JavaScript.