View Single Post
Old 12-24-2022, 09:34 PM   #443
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,050
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thanks

Quick question. I modified my template to add 'Omnibus' to the beginning of the list for easier searching. Lines 3-12 and 29-30:

Code:
program:

## Checking for omnibus
	if 
		'omnibus' 
	in 
		$#admin_tags 
	then 
		omnibus = 'Omnibus' 
	else 
		omnibus = ''
	fi;

## Splitting tags
	if 
		'^(Fiction|Nonfiction|Magazines & Periodicals)' in $#booktype 
	then 
		split_tags = re($tags, '\.', ',') 
	else
		split_tags = ''
	fi;

## Removing a few unwanteds and sorting
		cleaned_tags = list_sort(list_difference(
			split_tags,
			'Fiction, Nonfiction, Magazines & Periodicals, Cultures & Regions, Social Issues',
			','), 0, ',');

## Last runthrough
	cleaned_tags = list_union(cleaned_tags, omnibus, ',')
two questions:


a) Why does list_union seem to work in reverse? (e.g. if I put 'omnibus' first in template, it appears at the end of the list).

b) Currently, an icon rule checks #admin_tags for 'omnibus.' Would there be any performance impact by checking the composite column instead?

Thanks and merry christmas (or whatever you celebrate)

Last edited by ownedbycats; 12-25-2022 at 01:50 AM.
ownedbycats is online now   Reply With Quote