an opinionated gempub to epub converter written in awk.
an example (uncompressed) gpub file is provided.
you can generate the corresponding epub file using:
and then compress it as an epub with:
in order to convert another gpub, you can remix the following command, where
example-gpub/ would be the directory for your uncompressed gpub
awk -f g2e.awk example-gpub/
the converter works with gempub archives that have a flat file structure: all the
.gmi files, including
index.gmi, have to be in the same directory.
furthermore, the image assets for the book have to be inside that directory, within a directory called
for example, the structure for
example-gpub/ metadata.txt book/ index.gmi toc.gmi cover.gmi chapter1.gmi chapter2.gmi chapter3.gmi img/ screencap_uxn-pong.gif screenshot_uxn-pong-paddle.png screenshot_uxn-pong-paddles-and-ball.png screenshot_uxn-pong-paddles.png
note that only
.gif files are handled.
table of contents
there has to be a
toc.gmi file that will be used as the
nav element. this file has to have a single set of links pointed to internal
.gmi files, not images.
you can insert raw html using the corresponding
.gmo syntax: the contents of a line that starts with
+ will be inserted as is.
THIS IS CHAOTIC SOFTWARE BEWARE <//xj-ix.luxe/wiki/chaotic-software/>