Thanks. That'll be useful.
New question:
Code:
program:
if $#fanficcat then 'Fanfiction'
elif $#manualtype then 'Documentation & Manuals'
else re(sublist($tags, 0, 1, ','), '^(.*?)($|\..*$)', '\1')
fi
I use this to semi-automatically set an enumerated #booktype column.
It mostly works unless I have the
[Cleanup] tag, which is always listed first and
not in the enumerated list.
Is there a way to do either of the following?
1. Tell it to skip to the next tag if it finds
[Cleanup].
2. Tell it to search for the first
(foo|bar) tag, where the pattern matches the enumerated values.
I suspect the latter would be a better option as I sometimes don't clean up bulk-imported tags first, so something like 'Animals' or 'Biography' would come up before Fiction|Nonfiction.
Thanks.