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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-01-2011, 07:34 AM   #1
oldbwl
Zealot
oldbwl doesn't litteroldbwl doesn't litter
 
oldbwl's Avatar
 
Posts: 119
Karma: 164
Join Date: Aug 2010
Location: Old Ynysybwl
Device: Sony PRS-300
I want to write a script....

I want to automate a task I carry out repetitively. In MS Word I would record a macro, but I guess that is going to be a lot tougher here in Calibre. The tasks I want to automate are:

1. Convert selected in ebooks in current library from RTF to ePub - with global preferences
2. Delete RTF format from selected books
3. Copy Same books to another existing library (always the same one)
4. Convert Same books to Mobi using same preferences
5. Delete epub format from same books
6. "Copy and Delete Afterwards" Mobi to another named Library (always the same one.

I currently have 3 libraries. One for books requiring processing (all in RTF), and then a separate library each for epub and mobi (don't ask why, but there is a reason for that little madness).

How easy would it be for me to write such a script - where do I start? If not native within Calibre, is there a reasonable external macro program avail for Windows?

Regards
oldbwl is offline   Reply With Quote
Old 08-01-2011, 07:52 PM   #2
unboggling
by the bootstraps
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
Posts: 1,052
Karma: 858115
Join Date: Jan 2011
Location: Southeast US
Device: PRS-T2, Nexus 7, KindleT, iPad1, Kindle3KB
It sounds to me like it'd be a start towards a plugin, in which the choices of which format for batch processing at each step could be globally defined once by user: (1) format conversion from origin to target, (2) delete whatever global format list is set, (3) copy user-defined format to user-defined library. The rest of that seems redundant to me. The error checking and safeguards against global castasphrophe seem like it would be a headache to implement though. At present calibre already does all of that to whatever is selected without scripting anything special, just in a series of smaller steps. I'm not sure the convenience of a 1-click batch "do-a-lot-things" would outweigh the dangers of screwing up the libraries by forgetting or mistaking what choices were globally set. Anyway, I'm not a plugin developer so I am not speaking from experience. But plugin stuff here in the calibre forum and in the manual is where I'd start if I wanted to integrate scripted actions into calibre. Perhaps the developer's forum might be helpful too.
unboggling is offline   Reply With Quote
Old 08-01-2011, 07:59 PM   #3
unboggling
by the bootstraps
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
Posts: 1,052
Karma: 858115
Join Date: Jan 2011
Location: Southeast US
Device: PRS-T2, Nexus 7, KindleT, iPad1, Kindle3KB
Quote:
Originally Posted by oldbwl View Post
I currently have 3 libraries. One for books requiring processing (all in RTF), and then a separate library each for epub and mobi (don't ask why, but there is a reason for that little madness).
Why? I have a personal ideosyncratic requirement to process books in 1 library, and to keep processed books in another library. It makes sense to me to keep them separated. But what fuels the requirement to keep them segregated by format?
unboggling is offline   Reply With Quote
Old 08-02-2011, 05:09 AM   #4
oldbwl
Zealot
oldbwl doesn't litteroldbwl doesn't litter
 
oldbwl's Avatar
 
Posts: 119
Karma: 164
Join Date: Aug 2010
Location: Old Ynysybwl
Device: Sony PRS-300
Quote:
Originally Posted by unboggling View Post
Why? I have a personal ideosyncratic requirement to process books in 1 library, and to keep processed books in another library. It makes sense to me to keep them separated. But what fuels the requirement to keep them segregated by format?
All I wanted to know is what would be the best way to emulate the recording of macros in MS Word, when using Calibre. I don't want a new workflow or organisation method. I have a methodology, something which I like, want to keep, but want to try to streamline by assigning the various steps to a single keypress or toolbar button.

I understand I could get to grips with Python to write a specific plugin, but no thanks, it is beyond my capabilities. I have looked and downloaded several books and read a couple of tutorials. My needs are too immediate.

I can't get to the Help site whilst at work, and have little time when home, so I wondered if there was a reasonable macro program which emulated keypresses that works with calibre that someone could recommend. Or is there a script process within Calibre which is easy to learn and I could develop something in.
oldbwl is offline   Reply With Quote
Old 08-02-2011, 05:50 AM   #5
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 4,929
Karma: 802238
Join Date: Jan 2010
Location: France
Device: Many android devices
There is no scripting process inside calibre GUI other than plugins and python programs run in calibre's context (calibre-debug -e).

You can do some, perhaps all, of what you want to do using the command line, which can be scripted using .bat files (assuming you are using windows). The multi-library stuff won't be straight-forward, requiring an export, and import, and then a delete. It also won't be trivial to do the searching to get the book IDs to operate upon.

As for GUI keypress macro programs, I have no idea. Google finds http://www.autohotkey.com/ as well as others.
chaley is offline   Reply With Quote
Old 08-02-2011, 07:10 AM   #6
oldbwl
Zealot
oldbwl doesn't litteroldbwl doesn't litter
 
oldbwl's Avatar
 
Posts: 119
Karma: 164
Join Date: Aug 2010
Location: Old Ynysybwl
Device: Sony PRS-300
Quote:
Originally Posted by chaley View Post
There is no scripting process inside calibre GUI other than plugins and python programs run in calibre's context (calibre-debug -e).

You can do some, perhaps all, of what you want to do using the command line, which can be scripted using .bat files (assuming you are using windows). The multi-library stuff won't be straight-forward, requiring an export, and import, and then a delete. It also won't be trivial to do the searching to get the book IDs to operate upon.

As for GUI keypress macro programs, I have no idea. Google finds http://www.autohotkey.com/ as well as others.
Just the answer I was looking for, brilliant thanks.

I am proficient in writing .bat files and had forgotten the command line facility - silly me. (yep I have been around from b4 the web and can still fire up my Fidonet programs Allfix etal as well as all the Proboard stuff BBS - oh happy days. LOL!!!) Thanks for googling that program for me, I will check it out later. It could do just the job.
oldbwl 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
Why do you write? J.H. Farr Writers' Corner 42 10-27-2010 12:11 PM
Who do YOU write like? GraceKrispy Lounge 20 10-20-2010 10:41 PM
I Write Like Moejoe Writers' Corner 15 07-30-2010 09:44 PM
Would you like to write with me? Elliot Writers' Corner 0 12-29-2009 12:09 PM
Write Fast, Write Slow? Moejoe Writers' Corner 14 03-25-2009 09:55 AM


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


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