an opinionated gempub to epub converter
Go to file
sejo 8d456b6a7c remove <main> and <header> 2022-01-10 11:44:21 -06:00
example-gpub support for images 2021-12-14 14:09:25 -06:00
templates remove <main> and <header> 2022-01-10 11:44:21 -06:00
LICENSE.txt license 2021-12-13 20:56:05 -06:00
Makefile support for images 2021-12-14 14:09:25 -06:00
README.md support for images 2021-12-14 14:09:25 -06:00
g2e.awk remove <main> and <header> 2022-01-10 11:44:21 -06:00

README.md

g2e

an opinionated gempub to epub converter written in awk.

usage

an example (uncompressed) gpub file is provided.

you can generate the corresponding epub file using:

make example

and then compress it as an epub with:

make epub

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/

notes

file structure

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 img/.

for example, the structure for example-gpub is:

example-gpub/
  metadata.txt
  book/
    index.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 .gmi, .png, .jpg and .gif files are handled.

raw html

you can insert raw html using the corresponding .gmo syntax: the contents of a line that starts with + will be inserted as is.

references

license

THIS IS CHAOTIC SOFTWARE BEWARE <//xj-ix.luxe/wiki/chaotic-software/>