View Single Post
Old 08-18-2022, 02:37 PM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by st_albert View Post
Just a thought for those who may want to go the route of unzip - edit - re-zip their epubs.

I'm so old I remember doing this routinely, in the era Before Sigil.

If I recall correctly, the re-zipping has to be done in a particular way such that the "mimetype" file ends up as the first file in the root of the zip/epub directory, and it must be exactly 20 bytes in size, and it must have no compression. The content of the mimetype file is simply "application/epub+zip" (without quotes).

Again, IIRC, I did it by first zipping the mymetype file alone into a fresh zip file, then add the META-INF and OEBPS subdirectories in another step(s). (did that have to be done separately, in that order? I don't recall.)

Someone correct me if I've remembered it wrong. At the time, I just wrote a script file to handle it so I wouldn't have to think about it. Now, I've lost the script file.

Moral of the story: a very big to the Sigil developers and maintainers.

Albert
I used to edit the code that way. But I'd not extract META-INF and OEBPS. I would leave them be. Now I can use an editor to do my edits. Editing eBooks to fix the formatting helped me learn a lot of CSS/HTML and how eBooks are mostly poorly made.
JSWolf is offline   Reply With Quote