View Single Post
Old 05-01-2021, 04: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,044
Karma: 75555555
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:	3358
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 offline   Reply With Quote