View Single Post
Old 03-01-2022, 07:04 AM   #6
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: 11,788
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thanks for the "kobo newbie" help.

Quote:
Originally Posted by davidfor View Post
Kobo only reads the first dc:creator tag it finds. And assumes the authors are "FN LN" and that multiple authors "FN1 LN1, FN2, LN2, ...". I usually recommend:

Code:
program: raw_list('authors', ', ')
But, what you have looks like it should work.
I had seen your recommendation but it only works if the authors are already "FN LN". Mine are "LN, FN" and I don't want to change it. I considered using the following to change the individual authors then change the separator, but decided that the "more traditional" program was easier to read.
Code:
program:
	a = list_re_group($authors, '&', '.', '(^.*$)', 'program: swap_around_comma($)');
	re(a, '&', ', ')
Quote:
No, there isn't. I remember looking at that when I was writing the collections code, but, decided not to use it. You should be able to do it in a custom column. I have been thinking about allowing the use of a template instead of the list of columns. I am already using them elsewhere, so it would make sense to use them here as well. The main thing is to make sure it is backwardly compatible.
Using a template is a great idea. As for compatibility and assuming you don't want to add a checkbox "Columns box contains a template", you can assume it is a template if it starts with "program:" or contains a '{'. No list of lookup names can match that.

Using a template and setting the device name (below) solves another problem, using different collection columns for different devices. The template could condition its output on the value of current_device_name().
chaley is offline   Reply With Quote