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 09-06-2018, 11:09 AM   #1
drawson1
Connoisseur
drawson1 began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: Libra H20, Clara 2E
Set custom field value during "add"?

I have a script to add books to my Calibre library. I've just added some custom fields to the DB and would like to be able to set those from the script DURING the "add" command. Is this possible?

I know that I can make this work by running:

Code:
calibredb list search.....
(to find my newly added book)

followed by
Code:
calibredb set_metadata .....
but it would be nice to do it in one command.

Thanks!
Dan
drawson1 is offline   Reply With Quote
Old 09-06-2018, 10:00 PM   #2
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, but you dont need to use search. IIRC add outputs the ids of the added books, so you can simply use set_metadata directly after add.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-07-2018, 05:58 AM   #3
drawson1
Connoisseur
drawson1 began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: Libra H20, Clara 2E
OK, thanks!
drawson1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre "save to disk", "last_modified" field format bodiccea Calibre 20 09-01-2018 04:09 AM
Add Custom Column "#pages" in Send To OldLincoln Calibre Companion 1 11-27-2016 03:29 AM
A warning for Linux users: slow "Add Books", "Unknown" title and Author rolgiati Library Management 8 07-24-2013 04:36 PM
No "Add a custom news source" jmkizer Recipes 1 11-23-2011 05:48 PM
Can't clear "custom" date field? joegearhart Calibre 5 12-20-2010 03:32 AM


All times are GMT -4. The time now is 07:29 AM.


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