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.