View Single Post
Old 11-05-2018, 06:35 AM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ilovejedd View Post
Hmm, I seem to recall there might be a plugin that copies the contents of a composite column to custom column when you quit Calibre or something if the values have changed. You might want to look into that.
You would use a "Library Closed" plugin, which would have full access to calibre's database. If I were doing it I wouldn't bother with the composite column, instead calculating the value in the plugin then storing that value into an "contains names" column.

Two examples of library closed plugins: Save Composite Custom Columns and Save Virtual Libraries To Column

Quote:
Originally Posted by masp View Post
Thanks: I'll look into it. It is a shame that composite columns can't share the "contains names" feature along with the "comma-separated text like tags" columns: that would be perfect! I wonder if it's a code limitation or a philosophical limitation?
Both.

Both the Author columns and "Contains names" columns enforce ordering, ensuring that the authors always appear in the order they were originally listed. When custom columns were developed, comma-separated lists did not enforce order; a fetched list could have a different order from the originally stored list. As of calibre 3, all multiple fields enforce order, but no changes were made (see next issue).

More to the philosophical side: compatibility. Adding & as a separator would break anything that processes the list as text or constructs text from the list. For me, the benefit does not justify the pain.
chaley is offline   Reply With Quote