View Single Post
Old 09-29-2022, 07:32 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: 12,486
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DrChiper View Post
My brain needed some time to apsorb the above.
The short conclusion: it will not work for me.

In my case I have already in the calibre DB:
Code:
FN LN & FN LN & ...
Hence, this gives automagically in calibre for author_sort:
Code:
LN, FN & LN, FN & ...
Kobo, however, regards ',' (=comma) as an author separation and thus splits any author_sort string into 2 entries: which we (I) do not want.

Conclusion: unsolvable problem... or is it?

Can we perhaps via plugboard substitute the ',' (=comma) from author_sort into something else (a kind of comma resembling character), like for instance a cedilla (U+0088) ?
I tried this with my non-existant calibre template language knowledge and produced something like this (don't laugh):
Code:
{program:re(author_sort:list_item(0,&),',', 'U+0088')}

(This would try to replace only in the very first author_sort list entry the comma by something else.)
I got nowhere.
But, when this is still feasible, what would be the proper replacement template construct?
I don't understand. The provided template uses authors, not author_sort. If an author has a comma in the name (LN, FN) then the template changes it to FN, LN. It then changes all the & to commas. This is shown by the screen capture.

Did you try the template?
Attached Thumbnails
Click image for larger version

Name:	Clipboard03.jpg
Views:	127
Size:	82.8 KB
ID:	196857  
chaley is offline   Reply With Quote