View Single Post
Old 03-28-2022, 03:00 PM   #365
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,170
Karma: 77304081
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
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.

Last edited by ownedbycats; 03-28-2022 at 03:04 PM.
ownedbycats is offline   Reply With Quote