View Single Post
Old 01-01-2023, 04:59 PM   #30
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,529
Karma: 8075938
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This seems to work. You will need to uncomment line 5 and line 14. After that you should delete line 13 and lines 1-4, which are there so I can test the template.
Code:
program:
#	show = 'Criminal Minds, Law and Order';
#	show = 'Pretty Little Liars, Law and Order, Supergirl';
	show = 'Criminal Minds, Law and Order, Supergirl';
#	show = $#show;

	show1 = '^Criminal Minds$' inlist show && '^Law and Order$' inlist show;
	show2 = '^Pretty Little Liars$' inlist show && '^Law and Order$' inlist show;
	show3 = '^Supergirl$' inlist show && '^Law and Order$' inlist show;

	output = '';

	ao3tags_pair = 'Alex / Emily, Olivia / Alex';
#	ao3tags_pair = $#ao3tags_pair;

	for item in ao3tags_pair:
		ni = '';

		if show1 then
			if item ==  "Alex / Emily" then
				ni = "Emily Prentiss / Alex Cabot"
			fi
		fi;

		if show2 then
			if item ==  "Alex / Emily" then
				ni = "Emily Fields / Alex Cabot"
			fi
		fi;

		if show3 then
			if item ==  "Olivia / Alex" then
				ni = "Alex Danvers / Olivia Benson"
			fi
		fi;


		if ni then
			output = output & ',' & ni 
		else
			output = output & ',' & item
		fi
	rof;
	output = list_sort(list_remove_duplicates(output, ','), 0, ',')
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.png
Views:	91
Size:	64.4 KB
ID:	198787  
chaley is offline   Reply With Quote