02-25-2014, 09:02 PM | #16 | |
Connoisseur
Posts: 81
Karma: 86158
Join Date: Jan 2011
Location: Maryland
Device: NST, Kindle Fire, iPad2
|
That almost did it for me. I had to tweak it slightly to work on my system, so now it looks like:
Code:
if ( "$1" != "" ) then while ( "$1" != "" ) ebook-edit "$1" shift end else ebook-edit endif I tried the --detach option but it claims Quote:
Again, many thanks, both for pointing me in the right direction, and then showing me the path again when I wandered off. |
|
02-25-2014, 09:10 PM | #17 |
creator of calibre
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--detach is linux only. On OS X you can use
ebook-edit "$1" > /dev/null 2>&1 & (which does almost the same thing as --detach). |
Advert | |
|
02-25-2014, 09:12 PM | #18 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Oh, it seems --detach is linux only. Glad to hear it works for you.
EDIT: Or what Kovid said. Why did I forget about "&", when I use it every day when starting stuff from the command line? Ok, so you won't be able to close the parent terminal, not a big deal, its the same otherwise. Last edited by eschwartz; 02-25-2014 at 09:15 PM. |
02-26-2014, 03:29 PM | #19 |
Connoisseur
Posts: 81
Karma: 86158
Join Date: Jan 2011
Location: Maryland
Device: NST, Kindle Fire, iPad2
|
OK, I finally got it to do it all (as it were): open empty, open one file dropped on it, open multiple files simultaneously when dropped on it and launch as the default program when I open an epub.
I added the "&" to get the multiple books, but took out the redirect output to /dev/null since it kept giving me funny errors. When I run it as an app the output does not show up anyway. Maybe Automator sends it to /dev/null? Thank you both very much for the assistance. If anybody else wants to do this on a Mac, here is what my Automator process looks like. |
03-06-2014, 06:57 PM | #20 |
Wizard
Posts: 3,418
Karma: 35207650
Join Date: Jun 2011
Device: iPad
|
Thanks Loximuthal! The only thing I had to was put the full path to the ebook-edit.
/Applications/calibre.app/Contents/MacOS/ebook-edit Why does it work for you with that that? |
Advert | |
|
03-06-2014, 07:02 PM | #21 | ||
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Quote:
|
||
03-06-2014, 07:07 PM | #22 | |
Wizard
Posts: 3,418
Karma: 35207650
Join Date: Jun 2011
Device: iPad
|
Quote:
|
|
03-07-2014, 09:04 AM | #23 | |
Connoisseur
Posts: 81
Karma: 86158
Join Date: Jan 2011
Location: Maryland
Device: NST, Kindle Fire, iPad2
|
Quote:
|
|
07-29-2014, 12:02 PM | #24 |
Member
Posts: 16
Karma: 10
Join Date: Jul 2014
Device: iPad2
|
Did a search for just this subject and came upon this thread.
I am a Mac user (currently using OS X Lion - until next Fall when I buy a new Mac mini !!). Am uncomfortable using Terminal or Automator, although I have used them once or twice before. Ideally, it would be great if someone would create a plugin/script/whatever to make Calibre's ebook editor act like an independent app - so that less brave Mac users (like me) can simply download and install it. |
07-29-2014, 02:58 PM | #25 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I'm not a Mac person, or I'd upload the app for you. But see loximuthal's post, and the screenshot he put up.
The code will be: Code:
if ( "$1" != "" ) then while ( "$1" != "" ) ebook-edit "$1" & shift end else ebook-edit endif |
07-29-2014, 06:48 PM | #26 | |
Member
Posts: 16
Karma: 10
Join Date: Jul 2014
Device: iPad2
|
Quote:
Am unclear, however, where/when I should add/run the above script, which - if I understand the discussion correctly - would keep the Calibre editor in the dock and have it behave more like an independent drag-and-drop app. My questions reflect how little I know about the inner workings of my Mac or applications generally: * Do I enter that script code: in Terminal? Automator? Somewhere in Calibre's preferences? * Is that script code ALL that I type? OR…, * Should I type '/Applications/calibre.app/Contents/MacOS/ebook-edit' (in Terminal?) before I type out that script code? |
|
07-29-2014, 07:08 PM | #27 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
http://manual.calibre-ebook.com/cli/cli-index.html
Quote:
According to my Google-fu, you should create an automator application workflow, and add the "Run Shell Script" action. That will provide a box to insert that code, which should look like loximuthal's screenshot. You MUST USE "Pass input: as arguments" or else the files dragged onto the app will not get passed to the script, which was the whoe point. |
|
07-29-2014, 07:09 PM | #28 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
"/Applications/calibre.app/Contents/MacOS/ebook-edit" is the long version of ebook-edit, if you didn't install the command-line tools.
|
07-30-2014, 04:33 PM | #29 |
Member
Posts: 16
Karma: 10
Join Date: Jul 2014
Device: iPad2
|
Yes, had already installed the command-line tools.
Re loximuthal's script and Automator, I clearly am missing one or more steps. Not being a tech, I need complete start to finish instructions. Getting a script alone to copy/paste doesn't help, given I don't know what I should be selecting after I've started up Automator. I chose Application, then Run Shell Script, hoping I'd chosen correctly. Then once I saw the empty field open up, I pasted loximuthal's code into it. Looking at the image provided by loxi, I noted beside 'Shell:' the selection '/bin/csh', and beside 'Pass Input:' the selection 'as arguments'. So I selected those also. But what am I supposed to do after that? And did I take the correct steps so far? Since nothing else was obvious to me, I saved the file as an Application and named it Calibre Editor. But when I clicked the app in my Applications folder to start it, I got an error message. Clearly, I've done something wrong... OR I've misunderstood what this script is supposed to do and/or how it's to be activated... OR OS X Lion requires something different… OR... 'tis embarrassing to be so inept (though for my age cohort, I'm far ahead of the pack). |
07-31-2014, 01:41 AM | #30 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Hopefully, loximuthal will be back soon and provide guidance or the app. I'm afraid I've reached my depth with this link here: http://parezcoydigo.wordpress.com/20...ith-automator/
Also, I don't know why loximuthal used csh as bash is just So Much Better (and csh is reportedly weird). It is possible if you switch to bash which I know should work fine, it will work better. Did you try the drag and drop? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
regex in calibre editor | mrmikel | Editor | 2 | 02-01-2014 10:39 AM |
Calibre Ebook Editor | filmo | Kobo Reader | 0 | 01-13-2014 10:11 AM |
Calibre Editor for former Sigil users | theducks | Editor | 2 | 12-22-2013 12:55 PM |
Q: Should we have new sub-Calibre forum for ePub Editor? | phossler | Editor | 5 | 12-21-2013 12:41 PM |
[REQ] Cover browser window to launch independently in full screen | monkbythesea | Calibre | 10 | 08-18-2010 11:55 PM |