an opinionated gempub to epub converter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
sejo 5ac6f7ba64
change content.opf template based on the presence of translator metadata
12 months ago
example-gpub support for images 1 year ago
templates change content.opf template based on the presence of translator metadata 12 months ago
LICENSE.txt license 1 year ago
Makefile zip in required order 1 year ago
README.md epub 3.2 link 1 year ago
g2e.awk change content.opf template based on the presence of translator metadata 12 months ago

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
    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 .gmi, .png, .jpg and .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.

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