![]() |
#31 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
I've automated this a bit by adding the following to my .bash_profile
Code:
#Create ePub file from exploded directory at CWD # USAGE: zipub Path (shouldn't be under CWD) ie do zipub ../test.epub zipub () { zip -X0 $1 mimetype zip -rDX9 $1 * -x "*.DS_Store" -x mimetype } |
![]() |
![]() |
![]() |
#32 | |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Feb 2011
Location: San Francisco
Device: iPad
|
Quote:
I was able to work around it with a hack to the Applescript. It's not a fix, just a way to keep working. You're going to delete the troublesome code and hardwire the result it's attempting to produce - a path (i.e., location on your hard drive) to place the finished ePub file. The steps: - Open the script in the Applescript Editor - Run the script from the Editor, using the green run button, and select your ePub folder - It should fail with error message once you have selected the folder - Note at the bottom of the Editor there is an Event Log. You should see something like this: error "Can’t make «class ctnr» of alias \"home:Users:ronmartinez:a_yo_iBookC:\" into type text." number -1700 from «class ctnr» of alias "home:Users:ronmartinez:a_yo_iBookC:" to text (The error apparently has something to do with the attempt to re-type the alias so it can be used in a variable. Needs some investigation and puzzling out, but this is happening in the 5th line of the script: set ePubParent to (container of ePubFolder) as text The workaround: hardwire the ePubParent variable. This will be the location your newly created ePub will be placed in. To do the hardwiring, you'll put a properly formatted path into the variable. I just used the same folder the ePub is in, but you can use another.) - Note the correct form of the path in the second line of your error message in the Event Log. In my example: "home:Users:ronmartinez:a_yo_iBookC:" - Copy that string of text, including the quotes. - Replace the troublesome line 5 with a line of text that says the following: set ePubParent to "home:Users:ronmartinez:a_yo_iBookC:" Of course, using your own path, and not my example path! - Save As the script with a new name. - Run the script - It should work, and deposit the finished ePub at the destination indicated by the path. Note that you can use any destination folder on your hard drive volume, as long as the proper format is used. Hopefully this helps. Back up your work before you do anything, natch. But should be pretty innocuous, and hopefully provides the OP with some clues as to the bug. (And thank you for this script, again!). - Ron |
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Member
![]() Posts: 13
Karma: 10
Join Date: Feb 2010
Device: None
|
Thanks Ron
I've slightly lost track of what happened, but as it's working again now and I can't remember what (if anything) I ended up doing to fix it (maybe I downloaded anew?) Perhaps it was just having a bad day. It's a great script I use a lot despite the odd hiccup –*thanks for you reply though! Michael |
![]() |
![]() |
![]() |
#34 |
private investigator
![]() Posts: 2
Karma: 10
Join Date: Feb 2011
Device: Kindle iPhone
|
Thanks a lot pdurrant for the little app! It works beautifully!
Now, just out of curiosity (and because I'm interested in learning the nuts and bolts of the epub creation process), if I were to do in Terminal what your app does for me, which commands wound I have to enter? The ones in the first post of this thread don't seem to work. Sorry, I'm a UNIX noob. I keep getting messages such as "name not matched: mimetype" or "zip error: Nothing to do!" |
![]() |
![]() |
![]() |
#35 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,580
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#36 |
private investigator
![]() Posts: 2
Karma: 10
Join Date: Feb 2011
Device: Kindle iPhone
|
|
![]() |
![]() |
![]() |
#37 |
Connoisseur
![]() Posts: 55
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
|
Evening!
Thanks for making these scripts available. I've got a head-scratcher with ePub Zip that I'm hoping someone recognizes. I've unzipped an ePub with ePub Unzip, did a GREP alteration of some div tags in Text Wranger, and when I try to zip it back up, I get this: zip warning: name not matched: mimetype zip error: Nothing to do! (/Users/keithsnyder/Desktop/OEBPS.epub) I'm certain I didn't alter anything but the div tags; what else could be causing this? Thanks! (MacOS 10.5.8, Intel Core 2 Duo) EDIT: I'm an idiot. I was trying to zip the contents of the folder instead of the folder itself. Never mind... Last edited by noteon; 04-07-2011 at 05:04 PM. |
![]() |
![]() |
![]() |
#38 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2011
Device: Kindle
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#39 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2
Karma: 1234
Join Date: Aug 2011
Device: none
|
It is a great little tool, thank you.
And my rezipped ePub is working in the various readers I've been working with (Bookworm, Calibre, Ibis) but is now crashing Adobe Digital Editions (the original ePub file doesn't do that). Wondering if anyone else is experiencing this and what the problem may be. |
![]() |
![]() |
![]() |
#40 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,580
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
|
|
![]() |
![]() |
![]() |
#41 |
Junior Member
![]() ![]() ![]() Posts: 1
Karma: 202
Join Date: Sep 2011
Device: Android tablet
|
Thank you so much for the Applescript - I agree with David Derrico - you definitely rock super, super hard!
I'd spent the morning trying various zip commands, resulting in failed epubs, but now all is well. You are a star! |
![]() |
![]() |
![]() |
#42 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Nov 2011
Device: none
|
I downloaded the zip 1.02 script app, but I've not yet found the unzip 1.0 script app... I've been watching the training videos on Lynda.com but don't have access to the exercise files and scripts and they recommend this site! Can someone please point me to the download link... ty so much in advance!
|
![]() |
![]() |
![]() |
#43 | |
Wizzard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
|
Quote:
Hope this helps, and welcome to MobileRead! |
|
![]() |
![]() |
![]() |
#44 | |
All Around Nice Guy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21
Karma: 66666
Join Date: Oct 2010
Location: New York City
Device: iPad, iPhone, Kindle Keyboard, Kindle Fire, Nook 1st Gen, Nook Color
|
Quote:
https://www.mobileread.com/forums/sho...4&postcount=19 |
|
![]() |
![]() |
![]() |
#45 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jan 2012
Device: iPod Touch, Kindle Fire
|
Super script, great for InDesign too.
danrodney,,
Love this script. On a Mac, and thought I was going to have to buy Oxygen ($$$) just to fix epubs. This does all I need for now! Even better, it works great with InDesign CS5 .idml files (under the hood, a flavor of epub). Do you mind if I adapt it to make a script that fixes "stuck" unused colors in InDesign (you save as .idml, edit the graphics file and re-open)? Shall I credit you in the scripts header, want a link to this or just your name? |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |