fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ISBN in txt
[librarian.git]
/
librarian
/
text.py
diff --git
a/librarian/text.py
b/librarian/text.py
index
0761ab0
..
39bf324
100644
(file)
--- a/
librarian/text.py
+++ b/
librarian/text.py
@@
-26,7
+26,7
@@
Utwór opracowany został w ramach projektu Wolne Lektury przez fundację Nowocz
%(license_description)s.%(source)s%(publisher)s
%(license_description)s.%(source)s%(publisher)s
-%(description)s%(contributors)s%(funders)s
+%(description)s%(contributors)s%(funders)s
%(isbn)s
"""
"""
@@
-85,6
+85,11
@@
def transform(wldoc, flags=None, **options):
if funders:
funders = u"\n\nPublikację wsparli i wsparły: %s." % funders
publisher = '\n\nWydawca: ' + ', '.join(parsed_dc.publisher)
if funders:
funders = u"\n\nPublikację wsparli i wsparły: %s." % funders
publisher = '\n\nWydawca: ' + ', '.join(parsed_dc.publisher)
+ isbn_element = document.edoc.find("//meta[@id='txt-id']")
+ if isbn_element is not None:
+ isbn = isbn_element.text.replace('ISBN-', '\n\nISBN ')
+ else:
+ isbn = ''
else:
description = 'Publikacja zrealizowana w ramach projektu Wolne Lektury (http://wolnelektury.pl).'
url = '*' * 10
else:
description = 'Publikacja zrealizowana w ramach projektu Wolne Lektury (http://wolnelektury.pl).'
url = '*' * 10
@@
-93,6
+98,7
@@
def transform(wldoc, flags=None, **options):
contributors = ""
funders = ""
publisher = ""
contributors = ""
funders = ""
publisher = ""
+ isbn = ""
result = (TEMPLATE % {
'description': description,
'url': url,
result = (TEMPLATE % {
'description': description,
'url': url,
@@
-102,6
+108,7
@@
def transform(wldoc, flags=None, **options):
'contributors': contributors,
'funders': funders,
'publisher': publisher,
'contributors': contributors,
'funders': funders,
'publisher': publisher,
+ 'isbn': isbn,
}).encode('utf-8')
else:
result = unicode(result).encode('utf-8')
}).encode('utf-8')
else:
result = unicode(result).encode('utf-8')