Quote:
Originally Posted by beckywc
I have a custom column thats called "In Collection" this column is a text, but with a set of permitted values. These values are the collections I have currently on my Kindle. When I add a book to my library I select which collection it will go in.
How would I be able to alter you script to fit my set up?
Thanks
|
Pretty much the same as for tags/authors/series, except that you'd be retrieving the values from a custom column instead. Those values are also stored in calibre.metadata but you may need to dig a little deeper into the json structure to extract them.
You can open your calibre.metadata in a text editor to see exactly how its structured (and so from where you need to extract the values you want): It's just a json format structure.
Probably it'd be something like this to obtain the values to parse (based on a quick glance at the json structure just now - I've not tested this at all):
Code:
mycustom = book["user_metadata"]["#mycustomcolumnid"]["#value#"]
So, parse the calibre data in parseCalibreMetadata() then use your parsed data to build your collections in createCollectionsFromCalibre(). Follow through how this is done for tags and you should be able to handle your custom column similarly.