Quote:
Originally Posted by Katja_hbg
I already saw that. Now I will have a deeper look into it but maybe I am overwhelmed.
|
Here is a template that removes all tags bracketed by [] and all tags listed in the variable tags_to_ignore.
Code:
program:
# Remove any tag bracketed by []
tags = list_re($tags, ',', '^[^\[].*[^\]]$', '');
# Remove tags listed in tags_to_ignore
tags_to_ignore = 'AA.BBF.CCC, onDevice';
list_join(':@:', list_difference(tags, tags_to_ignore, ','), ',')
Example: if a book has the tags
Code:
[PBook], Science Fiction, allbooks.foo, Fiction, Fantasy, General, Epic, AA.BBF.CCC, onDevice
and tags_to_ignore is
Code:
tags_to_ignore = 'AA.BBF.CCC, onDevice';
then the template result is
Code:
allbooks.foo:@:Epic:@:Fantasy:@:Fiction:@:General:@:Science Fiction