View Single Post
Old 10-04-2018, 08:09 PM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I wrote a template for that a while ago in a discussion on the Kobo forum. See this post. I don't actually use it as a column, but use a slightly modified version to set colours based on the type.

And looking at it now, using first_matching_cmp, would be better:

Code:
program: 
words=raw_field('#words');
shelf_name=first_matching_cmp(words, 7500, 'Short Story',  17500, 'Novelette', 40000, 'Novella', 'Novel');
I haven't tested it, but it should be right.
davidfor is offline   Reply With Quote