View Single Post
Old 05-01-2021, 05:28 PM   #91
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,410
Karma: 80995913
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thanks

Any ideas why the second part of this template isn't removing the URIs?

Click image for larger version

Name:	2021-05-01 17_27_30-Template tester.png
Views:	3436
Size:	43.5 KB
ID:	186872

Code:
program:
	publisher = $publisher;
	ids = $identifiers;
	u = select(ids, 'uri');
	g = select(ids, 'gutenberg');

	if publisher == 'Project Gutenberg' && u != g then
		n = re(u, '^http://www.gutenberg.org/(\d+)', '\1');
		ids = list_union(ids, strcat('gutenberg:', n), ',')
	fi;

	if publisher == 'Project Gutenberg' && u && g then
		ids = list_difference(ids, strcat('uri:', u), ',')
	fi;
	ids
ownedbycats is online now   Reply With Quote