Quote:
Originally Posted by kovidgoyal
Use the correct field names, --list-fields is your friend.
|
Indeed, and I am using the correct field names. (take '--with-library' as given):
- calibredb set_metadata -f field:'value' id
works
- calibredb set_metadata -f field1:'value' -f field2:'value' id
works
- calibredb set_custom custfield1 id 'value'
works
- calibredb set_custom custfield1 id 'value' custfield2 id 'value'
respects only the first entry
- calibredb set_metadata -f custfield1:'value' id
- calibredb set_metadata -f #custfield1:'value' id
- calibredb set_metadata -f *custfield1:'value' id
- calibredb set_metadata -f '#custfield1':'value' id
- calibredb set_metadata -f '*custfield1':'value' id
do not recognize the custom field name (despite 'Custom Field', '#custfield' being returned when I query fields that can be set, using --list-fields)
- calibredb set_custom -f custfield:'value' id
does not recognize -f, as indeed I would not expect it to (but thought I would try anyway).
If there is a way to assign multiple custom columns via a single call I will happily use it. It is not documented in calibredb (--help or the help page). Obvious permutations and applications of the set_custom and set_metadata commands don't work as one might hope.
Multiple field specification when calling set_metadata does work (I don't see in the documentation that you can do this, but after you suggested it I tried and it worked), but I don't see how to get it to accept custom columns despite them being reported as available when I query using --list-fields.