
: Re: How to repack an epub file from command line I unzipped an epub file to make some minor modifications. How can I repack it properly to be a valid epub file from command line on Linux?
zip -X0 "my.epub" "mimetype"
zip -Xr "my.epub" "META-INF/" "OEBPS/"
As palacsint already pointed out, without the -X flag, one would run into the epubcheck error PKG_005
"The mimetype file has an extra field of length %1$s. The use of the extra field feature of the ZIP format is not permitted for the mimetype file."
because the mimetype file is being used as magical number within the compressed zip file, and the zip extra field feature (where zip programs and operating systems can place non-standardized data) would destroy the magical number mechanism (see github.com/IDPF/epubcheck/pull/497). The -0 flag makes sure that the mimetype file doesn't get compressed, which is also necessary for the mimetype file to work as a magical number, otherwise the data at the position where the mimetype file is expected could be compressed, scrambled gibberish.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Sarah

: Kindle paperwhite needs repair I have a kindle paperwhite and it continues to give me the message that it needs repair.Have tried to reset it but it does not respond. Any suggestions?

: Copying notes, bookmarks, highlighting, etc. added to a .pdf file on a Kindle to computer or other kindle I am using K2pdfopt to reflow the content of scientific papers (that are in .pdf format)