View Single Post
Old 02-20-2023, 08:13 PM   #5
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 293
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
The linked post deliberately chooses to use “and” for the last separator, which may affect the metadata parsing on the Kobo (though I haven't tested). Nickel expects the authors to be comma-separated in order to parse them properly and display books under the correct entry in the Authors view of your library. I use the following template, but I also clean up my authors metadata and remove suffices such as “, MD” or “, PhD”. (Otherwise, you end up with an “author” in the Kobo database whose name is literally “MD” or “PhD” or what have you.)

Code:
program: raw_list('authors', ', ')
If you wish to support authors with commas in their names without experiencing the above problem then I suggest finding a character similar to a comma (I will use an @ symbol below as a placeholder, for the sake of example) and doing two substitutions, one to change out author-internal commas, and a second to replace Calibre's default separator of an ampersand with the comma expected by Nickel:

Code:
program: list_join(', ', re($authors, ',', '@'), '&')
isarl is offline   Reply With Quote