View Single Post
Old 03-15-2025, 09:40 AM   #817
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,327
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Terisa de morgan View Post
I've got a doubt. I'm not very good with regular expressions, so I'm using this template for checking if there are non-ascii characters in a title:
Code:
program:
	title=field('title');
	aux=transliterate(title);
	if (title!=aux)
	then
		'true'
	else
		'false'
	fi
The template is returning true if there is a 'é' in the title, so it's fine. However, I'm using it as advanced rule for adding an icon to a column and the icon is not appearing. Is there is any issue with the template, the advanced rule, my way of doing it? I'm using calibre 7.23 (all the following versions have a mistake that affects my way of working) and windows 10 64 bits.
In an advanced icon rule the template must return the base name of the icon you want, for example 'myicon.png'. That icon must be in the cc_icons folder. Return the empty string if you don't want an icon.
chaley is offline   Reply With Quote