From df089451c5bc7cbd782b2741c48d0a23811dc524 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 4 Nov 2010 18:12:35 -0600 Subject: [PATCH] Fix #7402 (Add author field to generated metadata page) --- resources/jacket/stylesheet.css | 11 ++++++++++- resources/jacket/template.xhtml | 1 + src/calibre/ebooks/oeb/transforms/jacket.py | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/jacket/stylesheet.css b/resources/jacket/stylesheet.css index 8dee8edc3c..5f4f012d01 100644 --- a/resources/jacket/stylesheet.css +++ b/resources/jacket/stylesheet.css @@ -39,7 +39,16 @@ .cbj_title { font-size: x-large; text-align: center; - } +} + +/* +** Author +*/ +.cbj_author { + font-size: medium; + text-align: center; + margin-bottom: 1ex; +} /* ** Table containing Series, Publication Year, Rating and Tags diff --git a/resources/jacket/template.xhtml b/resources/jacket/template.xhtml index 93e12983e8..8447b1d6b3 100644 --- a/resources/jacket/template.xhtml +++ b/resources/jacket/template.xhtml @@ -7,6 +7,7 @@
{title}
+
{author}
diff --git a/src/calibre/ebooks/oeb/transforms/jacket.py b/src/calibre/ebooks/oeb/transforms/jacket.py index 88c7a4ff0e..e744a14389 100644 --- a/src/calibre/ebooks/oeb/transforms/jacket.py +++ b/src/calibre/ebooks/oeb/transforms/jacket.py @@ -143,11 +143,17 @@ def render_jacket(mi, output_profile, if comments: comments = comments_to_html(comments) + try: + author = mi.format_authors() + except: + author = '' + def generate_html(comments): args = dict(xmlns=XHTML_NS, title_str=title_str, css=css, title=title, + author=author, pubdate_label=_('Published'), pubdate=pubdate, series_label=_('Series'), series=series, rating_label=_('Rating'), rating=rating,
{series_label}: