View Single Post
Old 04-11-2018, 06:13 PM   #11
lucone
Member
lucone began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Feb 2010
Location: Milano, Italy
Device: IREX DR1000s, Kobo Aura H20
OK, I ( All thanks to davidfor, of course) did it.

This is the template:

Code:
{series:' first_non_empty(
                  in_list(field('tags'), ',', 
                            'Android', '__ Android', 
                            'Arduino', '__ Arduino', 
                            'Elettronica', '__ Elettronica',
'Elettronica', '__ Elettronica',
                            'Light Novel', strcat('__ LN ' , field('series')),
                          ''),                  
                  field('series'),
                  strcat('__Autore: ', re( re( field ('author_sort'), ",", " "), '_', '' ))
                )
       ;'}
Let me bore you for a while. trying to explain this template.
1) If book subject is Android, Arduino or Electronics (I'm italian, yesss), don't care about author or series put it in the shelf ( Android, Arduino or Elettronica)

2) If the book is a japanese light novel, I want to keep this series separated from "normal" books ( say, Aubrey & Maturin, Nero Wolfe, Sherlock Holmes etc), so the shelf is given by series name prefixed by __ LN{space}

3) If the book don't have any of the tags above described, well, if it is part of a series, put into the series shelf,

4) Otherwise, put it into the Author shelf

The underscores keeps the shelfes ordered alphabetically and "singletons" are kept in this way since I'm very, very lazy and, davidfor, in Author lists are present ALL the books belonging to the author, including the books that belong to some series.

However, Thanks very very much to all of you!
@davidfor: if you, by any chance, come by Milan, let me know!

Regards.
lucone is offline   Reply With Quote