View Single Post
Old 07-12-2025, 08:29 AM   #849
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,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jonnyl View Post
I'm not sure if questions about Cover generator templates are appropriate here, but here is my question:

I'd like add an extra line in the footer showing the publish date (pubdate) in a smaller font.

The current footer template is this (it shows up to two authors):

Code:
program:
# Show at most two authors, on separate lines.
authors = field('authors');
num = count(authors, ' & ');
authors = sublist(authors, 0, 2, ' & ');
authors = list_re(authors, ' &amp; ', '(.+)', '<b>\1');
authors = re(authors, ' &amp; ', '<br>');
re(authors, '&amp;&amp;', '&amp;')
What code would I have to add? Thanks for any help.
I haven't tested this in the cover generator but something like it should be close.
Code:
program:
# Show at most two authors on separate lines. followed by the pubdate
	authors = sublist($authors, 0, 2, ' & ');
	authors = re(authors, ' & ', '<br>');
	strcat(authors, '<br><small>', $pubdate, '</small>')
chaley is offline   Reply With Quote