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 06-09-2021, 07:28 PM   #1
lairdb
dog ear
lairdb began at the beginning.
 
Posts: 53
Karma: 12
Join Date: Jan 2012
Device: lots
list of ISBNs in text file; add OR set metadata via calibredb?

Ugh. I have a library reconciliation problem, and I'm not sure how to approach it.

(Environment is Windows 10; only one calibre library is in play.)

(Background: I am giving away about 3,000 paper books; I have previously recorded some of them into Calibre rows, but I'm not sure I've caught all of them, and I'd like to track what I've given away. I can barcode scan them as I box them.)

Scanning them in batches yields a text file of ISBN13s. (I can batch convert these to ISBN10s if needed.)


1) Some of those books are already in my Calibre library -- if they are, then their matching ISBN10 is in a custom column #PaperISBN. For those, I just want to add a tag.

I could do that by iterating through the file and using
Code:
calibredb search #paperisbn:0935526781
to find them -- but it's not obvious how to pipeline the search result to calibredb set_metadata.


2) If they are not in my library, I want to add them, set the tag, and set the #PaperISBN to the correct value.

I think I can do most of 2 with
Code:
 calibredb add --empty --isbn 0935526781 --tag newtag
...but that doesn't prevent duplicates and there's no way to set the custom field in add.

I could work around the custom field by using the GUI to select all tag:newtag and use metadata search/replace to copy the ISBN into #PaperISBN. (But that seems awkward.)

Help? Thanks.

Last edited by lairdb; 06-09-2021 at 07:30 PM. Reason: typos, clarification
lairdb is offline   Reply With Quote
Old 06-09-2021, 08:05 PM   #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: 30,920
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You can also create a CSV CATALOG using any search results/VL in the GUI.
Right click the CONVERT icon:Create catalog:<pick the type>
theducks is offline   Reply With Quote
Advert
Old 06-09-2021, 08:27 PM   #3
lairdb
dog ear
lairdb began at the beginning.
 
Posts: 53
Karma: 12
Join Date: Jan 2012
Device: lots
Quote:
Originally Posted by theducks View Post
You can also create a CSV CATALOG using any search results/VL in the GUI.
Right click the CONVERT icon:Create catalog:<pick the type>
Sorry, not sure how that applies. I already have the text file of ISBN13s -- I need to bash it against the Calibre db and add or update as appropriate.
lairdb is offline   Reply With Quote
Old 06-09-2021, 08:49 PM   #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: 30,920
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 lairdb View Post
Sorry, not sure how that applies. I already have the text file of ISBN13s -- I need to bash it against the Calibre db and add or update as appropriate.
Sorry, was confused about your task. Obviously, my sug is not valid.
theducks is offline   Reply With Quote
Old 06-09-2021, 09:19 PM   #5
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,344
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Many times I've done comparisons like that using Excel. Load the two lists into Excel and then do lookups of each value from one file in a table defined as all values from the other file.

I've also been known to do the comparisons in a Perl orpython script.

Sent from my Pixel 4a using Tapatalk
PeterT is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CalibreDB add and Temporary file descriptors filling up disk seru1us Library Management 3 05-10-2018 11:22 AM
calibredb add: IndexError: list index out of range sws Library Management 4 03-28-2015 01:25 AM
calibredb add metadata issue vir_db Library Management 0 07-21-2014 07:12 AM
Defining Metadata with "calibredb add" command line function. macr0t0r Calibre 3 03-01-2012 07:36 PM
calibredb add -- how to add additional metadata? TuxGirl Calibre 16 12-29-2011 01:01 AM


All times are GMT -4. The time now is 03:48 AM.


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