View Single Post
Old 02-13-2012, 01:38 PM   #5
Noughty
Addict
Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.Noughty is cognizant of many things which escape those who dream only by night.
 
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
I tried the
{tags:'list_sort(list_union('', re(subitems($, 0, 0), '(^|,)([^,]*?)\.', '\1 '), ','), '0', ',')'}

This works best if tags are two level, like Genre.Mystery, But if it is something like Character.Profession.Law enforcement it gives me Profession.Law enforcement and I would like to get only the last tag no matter how many levels there are.
How to edit it so it does that?
Here's the expected result:
Mystery>Mystery
Genre.Mystery>Mystery
Character.Profession.Law enforcement>Law enforcement
Book.Type.Anthology>Anthology

So if a book had these tags I would see final result as:
Anthology, Law enforcement, Mystery

I'm not sure I want to sort as it will give tags in category order, first all about the book, when character, when genre and so on. So I think it's better that sorting alphabetically. I removed sorting function but it still gives result sorted:
{#shelf:'list_union('', re(subitems($, 2, 4), '(^|,)([^,]*?)\.', '\1 '), ',')'}

Last edited by Noughty; 02-13-2012 at 01:48 PM.
Noughty is offline   Reply With Quote