View Single Post
Old 10-07-2024, 06:10 AM   #2
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I'm not sure what you want to display. Do you want "Goodreads" or do you want "Goodreads:12345"?

Assuming you want to see "Goodreads:12345" as a link and that the text column has "Contains HTML" checked, this should work:
Code:
program:
	gr_id = select($identifiers, 'goodreads');
	if gr_id then
		gr_id = 'goodreads:' & gr_id;
		l = urls_from_identifiers(gr_id, '');
		l = re(l, '>goodreads<', '>' & capitalize(gr_id) & '<')
	else
		l = ''
	fi
If you don't want to see the actual ID then use this:
Code:
program:
	gr_id = select($identifiers, 'goodreads');
	urls_from_identifiers('goodreads:' & gr_id, '')

Last edited by chaley; 10-07-2024 at 06:32 AM. Reason: Forgot to re-add < & >
chaley is offline   Reply With Quote