fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b0249c
)
Add thank-you note in EPUB and PDF.
author
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Tue, 8 Oct 2013 10:04:25 +0000
(12:04 +0200)
committer
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Tue, 8 Oct 2013 10:04:25 +0000
(12:04 +0200)
librarian/dcparser.py
patch
|
blob
|
history
librarian/epub.py
patch
|
blob
|
history
librarian/epub/xsltTitle.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
abee11b
..
a907a52
100644
(file)
--- a/
librarian/dcparser.py
+++ b/
librarian/dcparser.py
@@
-173,6
+173,7
@@
class WorkInfo(object):
as_person, salias='technical_editor', multiple=True, default=[]),
Field( DCNS('contributor.funding'), 'funders',
salias='funder', multiple=True, default=[]),
as_person, salias='technical_editor', multiple=True, default=[]),
Field( DCNS('contributor.funding'), 'funders',
salias='funder', multiple=True, default=[]),
+ Field( DCNS('contributor.thanks'), 'thanks', required=False),
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
f211ee4
..
bfd7570
100644
(file)
--- a/
librarian/epub.py
+++ b/
librarian/epub.py
@@
-418,6
+418,8
@@
def transform(wldoc, verbose=False,
if document.book_info.funders:
document.edoc.getroot().set('funders', u', '.join(
document.book_info.funders))
if document.book_info.funders:
document.edoc.getroot().set('funders', u', '.join(
document.book_info.funders))
+ if document.book_info.thanks:
+ document.edoc.getroot().set('thanks', document.book_info.thanks)
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/xsltTitle.xsl
b/librarian/epub/xsltTitle.xsl
index
17739a8
..
9544e27
100644
(file)
--- a/
librarian/epub/xsltTitle.xsl
+++ b/
librarian/epub/xsltTitle.xsl
@@
-52,6
+52,10
@@
</p>
</xsl:if>
</p>
</xsl:if>
+ <xsl:if test="@thanks">
+ <p class="info"><xsl:value-of select="@thanks" />.</p>
+ </xsl:if>
+
<p class="info">
Utwór opracowany został w ramach projektu<a href="http://www.wolnelektury.pl/"> Wolne Lektury</a> przez<a href="http://www.nowoczesnapolska.org.pl/"> fundację Nowoczesna Polska</a>.
</p>
<p class="info">
Utwór opracowany został w ramach projektu<a href="http://www.wolnelektury.pl/"> Wolne Lektury</a> przez<a href="http://www.nowoczesnapolska.org.pl/"> fundację Nowoczesna Polska</a>.
</p>
diff --git
a/librarian/pdf.py
b/librarian/pdf.py
index
90e4dc2
..
b4edfdb
100644
(file)
--- a/
librarian/pdf.py
+++ b/
librarian/pdf.py
@@
-233,6
+233,8
@@
def transform(wldoc, verbose=False, save_tex=None, morefloats=None,
editor.readable() for editor in document.editors())))
if document.book_info.funders:
root.set('funders', u', '.join(document.book_info.funders))
editor.readable() for editor in document.editors())))
if document.book_info.funders:
root.set('funders', u', '.join(document.book_info.funders))
+ if document.book_info.thanks:
+ root.set('thanks', document.book_info.thanks)
# 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
0de767c
..
a9ace8e
100644
(file)
--- a/
librarian/pdf/wl.cls
+++ b/
librarian/pdf/wl.cls
@@
-215,6
+215,11
@@
Letters={SmallCaps,UppercaseSmallCaps}
\vspace{.5em}
\fi
\vspace{.5em}
\fi
+ \ifdefined\thanknote
+ \thanknote
+ \vspace{.5em}
+ \fi
+
Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury}
przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}.
Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury}
przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}.
diff --git
a/librarian/pdf/wl2tex.xslt
b/librarian/pdf/wl2tex.xslt
index
353ecf9
..
ca948da
100644
(file)
--- a/
librarian/pdf/wl2tex.xslt
+++ b/
librarian/pdf/wl2tex.xslt
@@
-64,6
+64,11
@@
<parm>210mm</parm>
</cmd>
</xsl:if>
<parm>210mm</parm>
</cmd>
</xsl:if>
+ <xsl:if test="@thanks">
+ <TeXML escape="0">
+ \def\thanknote{<TeXML escape="1"><xsl:value-of select="@thanks" /></TeXML>}
+ </TeXML>
+ </xsl:if>
<cmd name="maketitle" />
<cmd name="tytul"><parm>
<cmd name="maketitle" />
<cmd name="tytul"><parm>