Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-06-2013, 01:18 AM   #1
anthony.burton4
Connoisseur
anthony.burton4 began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Aug 2010
Device: iPhone
Batch jobs

Is there a way to create scripted batch jobs?

i.e. Let's say that I want to perform some meta-data modifications - search and replace for various things and it's something I do periodically, always using the same methods.

e.g.
1) Replace "(epub)" with ""
2) Replace "(zip)" with ""
3) Reverse author name
4) Do another operation
5) etc

Is there any way of doing this in calibre?
anthony.burton4 is offline   Reply With Quote
Old 03-06-2013, 09:13 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by anthony.burton4 View Post
Is there a way to create scripted batch jobs?

i.e. Let's say that I want to perform some meta-data modifications - search and replace for various things and it's something I do periodically, always using the same methods.

e.g.
1) Replace "(epub)" with ""
2) Replace "(zip)" with ""
3) Reverse author name
4) Do another operation
5) etc

Is there any way of doing this in calibre?
Search and replace has a 'Save' and 'Use Saved' near the top
theducks is offline   Reply With Quote
Advert
Old 03-07-2013, 08:16 AM   #3
anthony.burton4
Connoisseur
anthony.burton4 began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Aug 2010
Device: iPhone
That can only record a single operation - a single change to the meta-data.

I asked if there was a means of creating batch jobs - i.e. multiple changes to the meta-data that could be applied to single or multiple books.
anthony.burton4 is offline   Reply With Quote
Old 03-07-2013, 09:08 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by anthony.burton4 View Post
That can only record a single operation - a single change to the meta-data.

I asked if there was a means of creating batch jobs - i.e. multiple changes to the meta-data that could be applied to single or multiple books.
You need to go back and look Bulk Metadata editing again

If I select 1000 books: fill out the form (forms if you have User columns), and Apply or OK, that applied those changes (Add or Remove) to all those books.

OR

If I use the last Tab (S&R) (This is the one with a save for later use option)
The change will be applied to ALL selected books THAT MATCH the Search

(I just completed a 1000 book (simple) S&R. it took 1 minute tops . The metadata backup ran in background for lots longer )
IT is true that S&R does not provide for a chained set of replaces, if you use a leading number when you save, you should easily click and APPLY in a sequence on the selected group of books
theducks is offline   Reply With Quote
Old 03-07-2013, 10:31 AM   #5
anthony.burton4
Connoisseur
anthony.burton4 began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Aug 2010
Device: iPhone
I couldn't make it clearer that I am trying to apply multiple meta-data changes concurrently to a book or books.

You are answering about applying a SINGLE change to multiple books - which I am well aware of how to do.

And yes - you can edit multiple fields using the batch update tabs 1 & 2, but all of the changes I am referring to are 3rd tab changes - I use a lot of regular expression edits, and these seem to only be able to apply one at a time.

I am aware that there are various mechanisms that do not make it to the UI that can be used with calibre, so I am hoping one of these can provide a way.

Last edited by anthony.burton4; 03-07-2013 at 10:34 AM.
anthony.burton4 is offline   Reply With Quote
Advert
Old 03-07-2013, 11:44 AM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by anthony.burton4 View Post
I couldn't make it clearer that I am trying to apply multiple meta-data changes concurrently to a book or books.

You are answering about applying a SINGLE change to multiple books - which I am well aware of how to do.

And yes - you can edit multiple fields using the batch update tabs 1 & 2, but all of the changes I am referring to are 3rd tab changes - I use a lot of regular expression edits, and these seem to only be able to apply one at a time.

I am aware that there are various mechanisms that do not make it to the UI that can be used with calibre, so I am hoping one of these can provide a way.
You will need to use the CLI. (see the Help pages)
for that, you will probably need the book Id(s) to control what books get applied.

Sorry, I am having problems wrapping my head around why you would need to do this so many times, that the various features can't be used.

In the Tags browser, there is 'Manage...' which allows renaming, deletion of tags,publishers,series that affects the whole library. (IMHO very useful for normalizing your data)
theducks is offline   Reply With Quote
Old 03-07-2013, 05:24 PM   #7
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
Quote:
Originally Posted by anthony.burton4 View Post
Is there a way to create scripted batch jobs?
Yes, but not IN calibre. It is possible to write fully automated scripts to change metadata, convert, change cover or do other things, using the shell of your operating system, or in some programming language of your choice that supports regular expressions, with the help of the command line tools that comes with calibre.

It is usually MUCH more convenient to directly use the gui in calibre.

http://manual.calibre-ebook.com/cli/cli-index.html
Adoby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Jobs Page iomari Calibre 0 09-07-2011 11:46 AM
The Book of Jobs kennyc Apple Devices 13 04-15-2011 10:20 AM


All times are GMT -4. The time now is 07:15 PM.


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