Requires pillow. On MacOS, install e.g. via brew install pillow.
python3 png2xtc.py <input> <output>where
<input>can be a single .png file or a folder of .png files<output>is the name of the XTC or XTG file (XTG for single image)
See epub2xtc.sh.
Run via
./epub2xtc.sh input.epub output.xtcThe script requires
- Calibre (for ebook-convert)
- mu-tools (faster) or ImageMagick (to convert PDF to PNG)
- Convert single PNG to black&white XTG
- Convert folder of PNGs to XTC
- Convert to grayscale (2bit per pixel) to XTH
- Implement Thumbnails in XTC
- Implement Metadata in XTC
- Implement Chapter Structure in XTC