View Single Post
Old 04-22-2016, 01:49 PM   #742
amely
Junior Member
amely began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Oct 2015
Device: none
Quote:
Originally Posted by chaley View Post
Post 550 gives you the clue -- how to determine if a number (a series index) is an integer or has a decimal point. However, after some thought I came up with a more efficient way to do it. Here is an example template in General Program Mode:
Code:
program:
	no_decimal = template('{authors}/{series}/{authors} - {series} {series_index:0>2s|   | - }{title}');
	has_decimal = template('{authors}/{series}/{authors} - {series} {series_index:0>5.2f|   | - }{title}');
	contains(
		field('series_index'),
		'\.',
		has_decimal, 
		no_decimal)

I'm sorry I missed it, I'll concentrate better next time when reading
I'm grateful you took time to make this more efficient way
amely is offline   Reply With Quote