Quote:
Originally Posted by PERSISTENCE
Hi chaley -
Sorry, I guess I'm too much of a noob to fully understand your advice. I'd be glad to do this, but need some help..could you help me get started (with syntax)? If I have some assistance to get started I can go from there...I just need a helping hand.
Thanks, in advance...I'll await word.
-Persistence
|
I am traveling and cannot do much for a few weeks, and in any event I don't want to write the function for you.
Custom functions are written in pure python, using the editor available from Preferences / Template Functions. The dialog provides some help for setting things up.
Here is a sample template function that returns the first word of a series if there is one, the empty string otherwise.
Code:
def evaluate(self, formatter, kwargs, mi, locals):
series = mi.get('series')
if series:
return series.split()[0]
return ''