Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2014, 02:44 PM   #91
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,367
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by Bonnie_27 View Post
hi I just came across this I know its a old post but I was wondering if this works for Windows as well I have version 8
Being AppleScripts, which are specific to Mac OS, they won't work on Windows.
pdurrant is offline   Reply With Quote
Old 04-02-2014, 03:02 PM   #92
Bonnie_27
Member
Bonnie_27 began at the beginning.
 
Bonnie_27's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2014
Location: Canada
Device: Kobo Glo N613
Quote:
Originally Posted by pdurrant View Post
Being AppleScripts, which are specific to Mac OS, they won't work on Windows.
do you know any Windows ones
Bonnie_27 is offline   Reply With Quote
Advert
Old 08-29-2014, 03:16 PM   #93
saoir
Groupie
saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.
 
saoir's Avatar
 
Posts: 188
Karma: 2088290
Join Date: Jan 2009
Location: Ireland
Device: Kindle Paperwhite
I have an ePub output from Scrivener that I want to add a title and copyright page to. I plan to use Dreamweaver.
Q: Does the ePub get structured (for reading by Kindle for example) based on the alphabetical order of the individual .xhtml files zipped into it ?
saoir is offline   Reply With Quote
Old 08-29-2014, 03:20 PM   #94
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by saoir View Post
I have an ePub output from Scrivener that I want to add a title and copyright page to. I plan to use Dreamweaver.
Q: Does the ePub get structured (for reading by Kindle for example) based on the alphabetical order of the individual .xhtml files zipped into it ?
No it does not. It gets the reading order from the spine section in the OPF. Read about ePub in our wiki.

Dale
DaleDe is offline   Reply With Quote
Old 08-29-2014, 03:40 PM   #95
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,367
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by saoir View Post
I have an ePub output from Scrivener that I want to add a title and copyright page to. I plan to use Dreamweaver.
Q: Does the ePub get structured (for reading by Kindle for example) based on the alphabetical order of the individual .xhtml files zipped into it ?
You would be a lot better off using calibre.
pdurrant is offline   Reply With Quote
Advert
Old 08-29-2014, 08:41 PM   #96
saoir
Groupie
saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.saoir ought to be getting tired of karma fortunes by now.
 
saoir's Avatar
 
Posts: 188
Karma: 2088290
Join Date: Jan 2009
Location: Ireland
Device: Kindle Paperwhite
Quote:
Originally Posted by pdurrant View Post
You would be a lot better off using calibre.
Ok .. I'll check that out. I've been using calibre for a while with my Kindle.

Tks
saoir is offline   Reply With Quote
Old 02-20-2015, 05:41 PM   #97
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,367
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
New! Version 3.0 for those using iBooks.
pdurrant is offline   Reply With Quote
Old 01-10-2016, 10:43 AM   #98
tahach
Junior Member
tahach began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2016
Device: kindle
A beginner I am not, but I cannot get v3 to do anything, when I run it it keeps asking what type of unzipping I want, and then there is no visible zip/unzip options, and "Edit Script" does nothing. I guess the manual zip instructions in the first posts were also written inaccurately, unless they are supposed to run after I do "cd 79239729.epub", but even then... I don't know, I was expecting this
zip -X0 <quoted form of ePubFilePath> mimetype

to look more like

zip -X0 <quoted form of ePubFilePath> <quoted form of ePubFilePath>/mimetype

Perhaps I am even more ignorant than I thought!
tahach is offline   Reply With Quote
Old 01-10-2016, 10:49 AM   #99
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,367
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by tahach View Post
A beginner I am not, but I cannot get v3 to do anything, when I run it it keeps asking what type of unzipping I want, and then there is no visible zip/unzip options, and "Edit Script" does nothing. I guess the manual zip instructions in the first posts were also written inaccurately, unless they are supposed to run after I do "cd 79239729.epub", but even then... I don't know, I was expecting this
zip -X0 <quoted form of ePubFilePath> mimetype

to look more like

zip -X0 <quoted form of ePubFilePath> <quoted form of ePubFilePath>/mimetype

Perhaps I am even more ignorant than I thought!

It's a drag&drop application. Just drag the ePub onto the icon to unzip, or drag a folder onto it to zip up into an ePub.

Yes, the command examples are to be run with the ePub folder as the current directory. But you really don't need to do them manually.

Ah - perhaps you haven't realised the <quoted form of ePubFilePath> is the full path to the .ePub zip file to be created. Not the folder from which the ePub is to be created. If you really want to run them from somewhere other than the ePub folder, you'd need

zip -X0 <quoted form of ePubFilePath> <quoted form of mimetype file in the ePubFolderPath>

and similar changes to the command to zip up all the other files.
pdurrant is offline   Reply With Quote
Old 01-10-2016, 01:46 PM   #100
tahach
Junior Member
tahach began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2016
Device: kindle
Thanks, I did try drag and drop too since I had vague recollection of a script working no other way some years back. What must have fooled me is that it all happens instantly and there is no feedback, except for overwriting a .pub. Having said that, I don't know if those .pubs were really created since I can't find them , I hope they are not inserted into iBooks or something that shocking! A few more drag and drops, I answered "Yes please delete old epub" and now I have broken something:

sh: line 0: cd: /Users/s/SwiftLanguage881256329.epub/: No such file or directory

My ambition has been to copy Apples Swift books to my Android device!
tahach is offline   Reply With Quote
Old 08-18-2016, 01:50 PM   #101
tommymac
Tommy
tommymac began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2016
Location: Italy
Device: Kindle Paperwhite
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
tommymac is offline   Reply With Quote
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,367
Karma: 305065800
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
Old 08-19-2016, 06:32 AM   #103
tommymac
Tommy
tommymac began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2016
Location: Italy
Device: Kindle Paperwhite
Quote:
Originally Posted by pdurrant View Post
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
Huge thanks!
I hadn't realized how the zip command works: Once I set-up the working directory with cd everything goes fine
tommymac is offline   Reply With Quote
Old 08-20-2016, 12:29 AM   #104
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by pdurrant View Post
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
In practice, that's completely unnecessary on OS X. The following produces identical results:

Code:
zip -Xr9D /path/to/filename.epub mimetype * -x .DS_Store
If you dig through OS X's zip source code (it is open source), you'll see that unless you either A. pass the -Z flag to force a particular compression method or B. pass the -0 flag to disable compression entirely, the OS X zip tool defaults to "BEST" mode, which means that it uses either STORE (uncompressed) or DEFLATE (compressed), depending on which would produce a smaller file.

Because the mimetype file's contents are so short, it gets larger when compressed with DEFLATE. Therefore, OS X's zip implementation will always store it using STORE rather than DEFLATE.

Your mileage may vary with other zip implementations.
dgatwood is offline   Reply With Quote
Old 08-20-2016, 03:56 AM   #105
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,367
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by dgatwood View Post
Your mileage may vary with other zip implementations.
E.g. earlier or later versions of Mac OS X's zip tool. I think I'll leave the AppleScript with the two step process.
pdurrant is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript Wrapper Application for Kindlegen pdurrant Kindle Formats 50 02-18-2020 01:16 AM
How to unzip a Calibre ZIP file on a Mac? webfolk Calibre 15 06-03-2012 06:01 PM
Useful Applescript for Mac OS X users pdurrant Kindle Formats 11 07-23-2011 05:00 AM
Mobiperl mobi2html changesetR84.zip won't unzip cyberbaffled Kindle Formats 0 06-15-2010 10:25 PM
Mac OS X lit2rtf AppleScript thingy FourOhFour Sony Reader 11 08-11-2007 12:02 AM


All times are GMT -4. The time now is 04:13 AM.


MobileRead.com is a privately owned, operated and funded community.