View Full Version : What do you use for editing epub files after creation?

12-25-2008, 07:33 PM
and also do programs like epubcheck help me verify the created epub files?
I'm finding about 1/25 epub files just don't work at all in my sony, and crash at some point during the book forcing the reader to reboot.

12-25-2008, 09:57 PM
and also do programs like epubcheck help me verify the created epub files?

That is in fact what epubcheck does.

You can edit an EPUB book using 'unzip', the text/HTML editor of your choice, then 'zip'. Check out HXA's "Epub Format Construction Guide" ( for some details on the necessary arguments to the 'zip' command-line tool when re-archiving the book. (You're on your own if doing this with a GUI -- best of luck.)

12-26-2008, 05:09 AM
I just unzip the .epub and edit the files with vim.

To re-create the .epub I have this script:


FILE="Title of the Book.epub"
rm -f "$FILE"
zip -X0 "$FILE" mimetype

01-07-2009, 06:31 AM
I just unzip them, too and edit them with Notetab Light. Well, if things are not too complicated, I edit in the epub file directly by opening the epub as I would a zip, open the file (mostly ncx anyway) and resave it directly to the zip folder.

07-16-2009, 03:43 AM
how would you re-create the epub file on OSX?

07-16-2009, 08:22 AM
how would you re-create the epub file on OSX?

Doesn't OSX have a command line zip? If it does, you can use what I wrote above:

zip -X0 file.epub mimetype
zip -X9Dr file.epub META-INF OEBPS

(assuming the same flags apply and the files are all in the OEBPS directory).

07-16-2009, 03:22 PM
Those flags should work fine on OS X.

I have a command aliased that gets rid of all the .DS_Store files that I run first. I then run the first zip line exactly as Jellby has it listed. For the second pass at the zip I use 'zip -r file.epub * -x mimetype'. Default compression settings are okay with me, and I'm assuming everything else in the directory should end up in the ePub anyways (I clean the directory up beforehand). The extra file attributes don't seem to cause any problems (unlike with the mimetype), but I should probably go ahead and add the -X into the second zip command anyways.

07-17-2009, 03:18 PM
how would you re-create the epub file on OSX?

Use Calibre

07-21-2009, 02:06 AM
What I use is WinRAR to access the contents of the ePub. It works very well. I don't need to rename the ePub from .epub to .zip ever. I just right click and slect open with WinRAR.

When I edited any of the files (non-graphics), I use Notepad++ as it works very well and has very nice regex. Plus, since ePub is split into multiple files, I can load all the HTML files in one go and do search/replace on all of them like they were one file. So I do not have to make the same corrections umpteen different times. And best of all, Notepad++ is free.