View Single Post
Old 11-03-2019, 06:27 PM   #11
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
Quote:
Originally Posted by JSWolf View Post
I'm not all that up on Python. I want to create a subtitle template that does the following...

If tag is not empty and series is empty. Meaning use the tag column data as the subtitle if there is data and no data in the series column.
Why on earth do you only want to set the subtitle only if there is no series? Just use:

Code:
{tags}
or maybe:

Code:
{:'raw_field("tags")'}
The difference there is the sorting.

And if you just want the first few tags:

Code:
{:'sublist(raw_field("tags"),0, 2, ",")'}
But, if you insist:

Code:
{:'ifempty(field("series"),sublist(raw_field("tags"),0, 2, ","))'}
davidfor is offline   Reply With Quote