View Single Post
Old 08-18-2016, 03:54 PM   #102
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,516
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by tommymac View Post
I have tried the version 3 of the App Epub zip-unzip and I like it. With a simple drag 'n drop I had my epub zipped correctly.
I'm wondering how can I obtain the same result with the terminal. I make these instructions but at the ended the epub won't open with Ibooks on my mac:

- unzip a working epub exported with iBooks Author
- zip the folder from terminal with the command zip -r newbook.zip newbook -x *.META-INF -x mimetype
- with kitabu I can open the file but no with iBook

There is some problem with the order of the files in the ZIP? I know that the mimetype must go first but I don't know how ZIP engine works on my mac
Or maybe I wrote badly the recursive instruction for the folder META-INF?

All helps are welcome
You need to use two zip commands. One to add the mimetype, uncompressed, and then one to add the other files.

zip -X0 <quoted form of ePubFilePath> mimetype
zip -rDX9 <quoted form of ePubFilePath> * -x "*.DS_Store" -x mimetype
pdurrant is offline   Reply With Quote