View Single Post
Old 03-17-2025, 11:32 AM   #15
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,649
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by DrChiper View Post
Yes, it is a nice check: well found . However, I do also have sub-titles, so I had to rework the template a little bit.
Code:
program:
	if (field('title')!=transliterate(field('title')))
	then
		if (field('#subtitle')!=transliterate(field('#subtitle')))
		then
			'true1, true2'
		else
			'true1'
		fi
	else
		if (field('#subtitle')!=transliterate(field('#subtitle')))
		then
			'true2'
		else
			'false'
		fi
	fi
It returns true1 for title, true2 for subtitle, or false when neither contains non-ASCII chars.

The reason I didn't use intermediate vars is because I noticed that the formatter stops processing/evaluating in case of a nil situation, so this seems to be fastest way to process. But as always, correct me if I'm wrong
You can add author For me, I'm using only title or author because they add an icon to the column. About nil variable... no idea.
Terisa de morgan is offline   Reply With Quote