View Single Post
Old 03-13-2015, 06:25 PM   #56
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Quote:
Originally Posted by eschwartz View Post
Lots more good information and useful functions listed in the manual (and built into the template dialog box) -- when you get a spare moment (and assuming you intend to master the use of templates) I suggest you take a look-see through them.

I don't remember half of them except well enough to know -- usually -- that "there should be something vaguely capable of doing x, let me look that up".
I downloaded the manual as epub and will have a closer look on the template section this weekend instead of reading a good fantasy book.

So at the end i am using:
Code:
program:

# return separator+authors if Multi Autor Serie (MAS) is not found, or return empty
various_authors=str_in_list(
	field('tags'),
	',',
	'MAS',
	'',
	 strcat(' - ', field('authors'))
);
end_template=template('{series_index:0>4s| | - }{title} - {authors}');

start_template=test(
	field('series'),
	strcat(
		'_ ',
		field('series'),
		various_authors
	),
	field('authors')
);

strcat(start_template, '/', end_template);
I only would love one little change also based on Tag "MAS" i use and regarding series_index.

When MAS is found in Tags i like to have 0>4s (those series go app to 2000 books), but not in the other series (mostly they end at 20 at the most). Also there are some series with series indices with sub values 1.5, 2.0, 2.5 etc and those series are never bigger than 20 books.

So if MAS in Tags is not found i would like to have a series index with 0>4.2f or 0>4.1f, if found 0>4

Possible or a better solution?

Last edited by Thomas_AR; 03-13-2015 at 06:37 PM.
Thomas_AR is offline   Reply With Quote