From: Radek Czajka Date: Wed, 7 Aug 2013 10:19:28 +0000 (+0200) Subject: Add funders info. X-Git-Tag: 1.7~131 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/5ecf203ebb02e8b60616d210f81908bcf3da2634?hp=-c Add funders info. --- 5ecf203ebb02e8b60616d210f81908bcf3da2634 diff --git a/librarian/dcparser.py b/librarian/dcparser.py index eddd8e5..abee11b 100644 --- a/librarian/dcparser.py +++ b/librarian/dcparser.py @@ -171,6 +171,8 @@ class WorkInfo(object): as_person, salias='editor', multiple=True, default=[]), Field( DCNS('contributor.technical_editor'), 'technical_editors', as_person, salias='technical_editor', multiple=True, default=[]), + Field( DCNS('contributor.funding'), 'funders', + salias='funder', multiple=True, default=[]), Field( DCNS('date'), 'created_at', as_date), Field( DCNS('date.pd'), 'released_to_public_domain_at', as_date, required=False), diff --git a/librarian/epub.py b/librarian/epub.py index eab2b18..24579d9 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -415,6 +415,9 @@ def transform(wldoc, verbose=False, # add editors info document.edoc.getroot().set('editors', u', '.join(sorted( editor.readable() for editor in document.editors()))) + if document.book_info.funders: + document.edoc.getroot().set('funders', u', '.join( + document.book_info.funders)) opf = xslt(document.book_info.to_etree(), get_resource('epub/xsltContent.xsl')) manifest = opf.find('.//' + OPFNS('manifest')) diff --git a/librarian/epub/style.css b/librarian/epub/style.css index 622c8da..a862dce 100644 --- a/librarian/epub/style.css +++ b/librarian/epub/style.css @@ -364,7 +364,9 @@ em.author-emphasis margin-right: 2em; } -p.minor { +p.minor-info { + text-align: center; + margin-bottom: 1em; font-size: 0.75em; } p.footer { diff --git a/librarian/epub/xsltLast.xsl b/librarian/epub/xsltLast.xsl index 9b52203..c4867d1 100644 --- a/librarian/epub/xsltLast.xsl +++ b/librarian/epub/xsltLast.xsl @@ -63,6 +63,8 @@ + +

Okładka na podstawie: @@ -82,7 +84,7 @@

 

-

+

Plik wygenerowany dnia .

@@ -103,6 +105,13 @@
+ + +

Publikację ufundowali i ufundowały: + .

+
+
+ diff --git a/librarian/pdf.py b/librarian/pdf.py index 9fb92b1..90e4dc2 100644 --- a/librarian/pdf.py +++ b/librarian/pdf.py @@ -231,6 +231,8 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None, # add editors info root.set('editors', u', '.join(sorted( editor.readable() for editor in document.editors()))) + if document.book_info.funders: + root.set('funders', u', '.join(document.book_info.funders)) # hack the tree move_motifs_inside(document.edoc) diff --git a/librarian/pdf/wl.cls b/librarian/pdf/wl.cls index 4a7648e..0de767c 100644 --- a/librarian/pdf/wl.cls +++ b/librarian/pdf/wl.cls @@ -246,6 +246,11 @@ Letters={SmallCaps,UppercaseSmallCaps} \editors + \ifdefined\funders + \vspace{.6em} + \funders + \fi + \ifdefined\coverby \vspace{.6em} \coverby diff --git a/librarian/pdf/wl2tex.xslt b/librarian/pdf/wl2tex.xslt index 97296e9..c0c22e5 100644 --- a/librarian/pdf/wl2tex.xslt +++ b/librarian/pdf/wl2tex.xslt @@ -100,7 +100,11 @@ } - \def\editors{} + \def\editors{} + + \def\funders{Publikację ufundowali i ufundowały: + .} +