Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-25-2014, 09:02 PM   #16
loximuthal
Connoisseur
loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.
 
loximuthal's Avatar
 
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
This allows me to drop one or more books on the icon or launch it empty. I am a happy camper now

I tried the --detach option but it claims
Quote:
ebook-edit: error: no such option: --detach
which if fine by me. I almost never edit multiple books simultaneously, and if I do want to I can still drop books one at a time on the script I've got now.

Again, many thanks, both for pointing me in the right direction, and then showing me the path again when I wandered off.
loximuthal is offline   Reply With Quote
Old 02-25-2014, 09:10 PM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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).
kovidgoyal is offline   Reply With Quote
Advert
Old 02-25-2014, 09:12 PM   #18
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Old 02-26-2014, 03:29 PM   #19
loximuthal
Connoisseur
loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.
 
loximuthal's Avatar
 
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.
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2014-02-26 at 3.26.53 PM.png
Views:	350
Size:	28.2 KB
ID:	119626  
loximuthal is offline   Reply With Quote
Old 03-06-2014, 06:57 PM   #20
VydorScope
Wizard
VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.
 
VydorScope's Avatar
 
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?
VydorScope is offline   Reply With Quote
Advert
Old 03-06-2014, 07:02 PM   #21
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
Originally Posted by VydorScope View Post
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?
From the manual: http://manual.calibre-ebook.com/cli/cli-index.html

Quote:
On OS X you have to go to Preferences->Advanced->Miscellaneous and click install command line tools to make the command line tools available. On other platforms, just start a terminal and type the command.
eschwartz is offline   Reply With Quote
Old 03-06-2014, 07:07 PM   #22
VydorScope
Wizard
VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.VydorScope ought to be getting tired of karma fortunes by now.
 
VydorScope's Avatar
 
Posts: 3,418
Karma: 35207650
Join Date: Jun 2011
Device: iPad
Quote:
Originally Posted by eschwartz View Post
Ah cool - for some reason I thought I did that already, but doing it just now fixed it. Thanks!
VydorScope is offline   Reply With Quote
Old 03-07-2014, 09:04 AM   #23
loximuthal
Connoisseur
loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.
 
loximuthal's Avatar
 
Posts: 81
Karma: 86158
Join Date: Jan 2011
Location: Maryland
Device: NST, Kindle Fire, iPad2
Quote:
Originally Posted by eschwartz View Post
Thanks for getting that. I would have had to think hard to remember that. It's been quite some time since I installed the command-line tools
loximuthal is offline   Reply With Quote
Old 07-29-2014, 12:02 PM   #24
McJal'm
Member
McJal'm began at the beginning.
 
McJal'm's Avatar
 
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.
McJal'm is offline   Reply With Quote
Old 07-29-2014, 02:58 PM   #25
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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
eschwartz is offline   Reply With Quote
Old 07-29-2014, 06:48 PM   #26
McJal'm
Member
McJal'm began at the beginning.
 
McJal'm's Avatar
 
Posts: 16
Karma: 10
Join Date: Jul 2014
Device: iPad2
Quote:
Originally Posted by eschwartz View Post
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
I started Terminal and entered '/Applications/calibre.app/Contents/MacOS/ebook-edit' (without the quotes). That started Calibre's editor and so I was able to edit two ePUBs without first having to add them to Calibre's library. Then I quit the Calibre editor, then Terminal.

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?
McJal'm is offline   Reply With Quote
Old 07-29-2014, 07:08 PM   #27
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
On OS X you have to go to Preferences->Advanced->Miscellaneous and click install command line tools to make the command line tools available. On other platforms, just start a terminal and type the command.
Afterward, just type that code into automator as per loximuthal's screenshot.

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.
eschwartz is offline   Reply With Quote
Old 07-29-2014, 07:09 PM   #28
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Old 07-30-2014, 04:33 PM   #29
McJal'm
Member
McJal'm began at the beginning.
 
McJal'm's Avatar
 
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).
McJal'm is offline   Reply With Quote
Old 07-31-2014, 01:41 AM   #30
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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?
eschwartz is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:48 PM.


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