EPUB utilities

Two small perl scripts (Intended for linux, may be adaptable to Windows) for working with books in EPUB format. May be useful.

advepub.pl : Makes .epub files smaller, losslessly, in conjunction with the AdvanceCOMP and jpegoptim utilities. It works by extracting the .epub file, applying advpng to any png images within and jpegoptim to jpegs (both losslessly), repacking the epub, and then applying advzip. Works especially well on non-fiction books full of diagrams in PNG format. The resulting epub will be indistinguisable, other than being smaller due to more efficient (Zopfli and jpegoptim) compression.

epubmeta.pl : Reads the metadata from an EPUB file. It can also extract just the document identifier, which is typically an ISBN number, but not always.