View Single Post
Old 01-13-2022, 07:13 PM   #286
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,110
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Code:
program:
	publisher = $publisher;
	ids = $identifiers;
	u = select(ids, 'url');
	s = select(ids, 'standard');

	if publisher == 'Standard Ebooks' && u != s then
		n = re(u, '^^https://standardebooks.org/ebooks/()', '\1');
		ids = list_union(ids, strcat('standard:', n), ',')
	fi;

	if publisher == 'Standard Ebooks' && u && s then
		ids = list_difference(ids, strcat('url:', u), ',')
	fi;
	ids
In an Action Chain, if I run this once, it produces the standardidentifier and does not delete the url: identifier. If I run it on a book that has both standard and url: identifiers it does delete the url:. Do I need to make it two separate actions/templates?

Last edited by ownedbycats; 01-13-2022 at 07:19 PM.
ownedbycats is offline   Reply With Quote