-
Notifications
You must be signed in to change notification settings - Fork 2
Files inside an EPUB
An EPUB file is just a zipped container with (essentially) webpages inside. This is a list of file types that can be found inside an EPUB, and what the script does, or could do with each of them.
A technical note: I am referring to files here by their extension, not necessarily by mimetype. I considered, for example, changing all the jpeg images to pngs, but leaving the extension intact and only modifying the mimetype in the OPS/OEBPS file. This would technically be correct, and would avoid having to change the HTML files at all, but could quickly get confusing, and I'm not sure if the nook would support such a scheme.
One of my books includes a sample chapter from another book as another epub. I took a step towards addressing this by moving the work of the script into a function so that I might be able to call it recursively in the future. But I will need to address the issue of renaming before that works.
Technically the OPS spec allows SVG images. If these are encountered, scour might be a good tool to use, although SVG tends to be pretty small already.
Currently all images are transformed into pngs, and then converted to greyscale and 16 colors. If the image is larger than 600x800, then it is shrunk to size. I haven't tried any other levels of compression. A tool like optipng might be useful here, depending on the default settings of imagemagick.