View Single Post
Old 09-04-2009, 06:42 PM   #4
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
I've been thinking about simplifying this in some way, but if you want to make a drag'n'drop script it'll be that much easier on me.

The terminal commands to do it are:
Code:
zip -X0 bookname.epub mimetype
zip -rX9 bookname.epub * -x mimetype
The first line makes the zip file (with epub extension) with only the mimetype and no compression (the -0 switch). The second line recursively goes through the directory (-r) and adds everything else (the *) to the zip file at maximum compression (-9) while excluding the mimetype file (-x). The -X switch ignores any extra file attributes.

It's not a bad idea to precede the whole thing with this command to clear out the .DS_Store files first:
Code:
find . -name '*.DS_Store' -type f -delete
(I have that aliased to 'rmds' in my .profile for typing simplicity.)
Abecedary is offline   Reply With Quote