fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b56beb6
)
Add funders info.
author
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Wed, 7 Aug 2013 10:19:28 +0000
(12:19 +0200)
committer
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Wed, 7 Aug 2013 10:19:28 +0000
(12:19 +0200)
librarian/dcparser.py
patch
|
blob
|
history
librarian/epub.py
patch
|
blob
|
history
librarian/epub/style.css
patch
|
blob
|
history
librarian/epub/xsltLast.xsl
patch
|
blob
|
history
librarian/pdf.py
patch
|
blob
|
history
librarian/pdf/wl.cls
patch
|
blob
|
history
librarian/pdf/wl2tex.xslt
patch
|
blob
|
history
diff --git
a/librarian/dcparser.py
b/librarian/dcparser.py
index
eddd8e5
..
abee11b
100644
(file)
--- 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=[]),
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),
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
(file)
--- 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())))
# 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'))
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
(file)
--- a/
librarian/epub/style.css
+++ b/
librarian/epub/style.css
@@
-364,7
+364,9
@@
em.author-emphasis
margin-right: 2em;
}
margin-right: 2em;
}
-p.minor {
+p.minor-info {
+ text-align: center;
+ margin-bottom: 1em;
font-size: 0.75em;
}
p.footer {
font-size: 0.75em;
}
p.footer {
diff --git
a/librarian/epub/xsltLast.xsl
b/librarian/epub/xsltLast.xsl
index
9b52203
..
c4867d1
100644
(file)
--- a/
librarian/epub/xsltLast.xsl
+++ b/
librarian/epub/xsltLast.xsl
@@
-63,6
+63,8
@@
<xsl:call-template name="editors" />
<xsl:call-template name="editors" />
+ <xsl:call-template name="funders" />
+
<xsl:if test="@data-cover-by">
<p class="info">Okładka na podstawie:
<xsl:choose>
<xsl:if test="@data-cover-by">
<p class="info">Okładka na podstawie:
<xsl:choose>
@@
-82,7
+84,7
@@
</xsl:if>
<p class="info"> </p>
</xsl:if>
<p class="info"> </p>
- <p class="minor
info">
+ <p class="minor
-
info">
Plik wygenerowany dnia <span id="file_date"><xsl:value-of select="substring(date:date(), 1, 10)" /></span>.
</p>
Plik wygenerowany dnia <span id="file_date"><xsl:value-of select="substring(date:date(), 1, 10)" /></span>.
</p>
@@
-103,6
+105,13
@@
</xsl:if>
</xsl:template>
</xsl:if>
</xsl:template>
+ <xsl:template name="funders">
+ <xsl:if test="@funders">
+ <p class="minor-info">Publikację ufundowali i ufundowały:
+ <xsl:value-of select="@funders" />.</p>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template match="text()" mode="person">
<xsl:value-of select="wl:person_name(.)" />
</xsl:template>
<xsl:template match="text()" mode="person">
<xsl:value-of select="wl:person_name(.)" />
</xsl:template>
diff --git
a/librarian/pdf.py
b/librarian/pdf.py
index
9fb92b1
..
90e4dc2
100644
(file)
--- 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())))
# 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)
# hack the tree
move_motifs_inside(document.edoc)
diff --git
a/librarian/pdf/wl.cls
b/librarian/pdf/wl.cls
index
4a7648e
..
0de767c
100644
(file)
--- a/
librarian/pdf/wl.cls
+++ b/
librarian/pdf/wl.cls
@@
-246,6
+246,11
@@
Letters={SmallCaps,UppercaseSmallCaps}
\editors
\editors
+ \ifdefined\funders
+ \vspace{.6em}
+ \funders
+ \fi
+
\ifdefined\coverby
\vspace{.6em}
\coverby
\ifdefined\coverby
\vspace{.6em}
\coverby
diff --git
a/librarian/pdf/wl2tex.xslt
b/librarian/pdf/wl2tex.xslt
index
97296e9
..
c0c22e5
100644
(file)
--- a/
librarian/pdf/wl2tex.xslt
+++ b/
librarian/pdf/wl2tex.xslt
@@
-100,7
+100,11
@@
</xsl:choose>
}
</xsl:if>
</xsl:choose>
}
</xsl:if>
- \def\editors{<xsl:call-template name="editors" />}
+ \def\editors{<TeXML escape="1"><xsl:call-template name="editors" /></TeXML>}
+ <xsl:if test="@funders">
+ \def\funders{Publikację ufundowali i ufundowały:
+ <TeXML escape="1"><xsl:value-of select="@funders" /></TeXML>.}
+ </xsl:if>
</TeXML>
<cmd name="editorialsection" />
</TeXML>
<cmd name="editorialsection" />