View Single Post
Old 03-27-2021, 03:30 PM   #5718
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,085
Karma: 76037135
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Also, if it's of any use, here are two templates that extract story IDs and converts them into custom AO3/FFNet identifiers unless status is set to anthology. You'll need something like Action Chains to use it.

Code:
program:
	publisher = field('publisher');
	ids = field('identifiers');
	status = field('#fanficstatus');
	u = select(ids, 'url');

	if publisher == 'Archive of Our Own' && u && status != 'Anthology' then
		n = re(u, '^https://archiveofourown.org/works/(\d+)$', '\1');
		ids = list_union(ids, strcat('ao3:', n), ',')
	fi;
	ids
Code:
program:
	publisher = field('publisher');
	ids = field('identifiers');
	status = field('#fanficstatus');
	u = select(ids, 'url');

	if publisher == 'FanFiction.net' && u && status != 'Anthology' then
		n = re(u, '^https://www.fanfiction.net/s/(\d+)/(\d+)/.*', '\1');
		ids = list_union(ids, strcat('ffnet:', n), ',')
	fi;
	ids

Last edited by ownedbycats; 03-27-2021 at 04:22 PM.
ownedbycats is offline   Reply With Quote