X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/2ea20e32dd822ece8a2df9693da42cfdaffcbc72..a0ce0b15a412e4bc325470c1801968b8bdd1c7ec:/librarian/text.py diff --git a/librarian/text.py b/librarian/text.py index e19716e..4064849 100644 --- 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 -%(description)s%(contributors)s%(funders)s +%(description)s%(contributors)s%(funders)s%(isbn)s """ @@ -60,7 +60,7 @@ def transform(wldoc, flags=None, **options): license_description = parsed_dc.license_description license = parsed_dc.license if license: - license_description = u"Ten utwór jest udostepniony na licencji %s: \n%s" % ( + license_description = u"Ten utwór jest udostępniony na licencji %s: \n%s" % ( license_description, license) else: license_description = u"Ten utwór nie jest objęty majątkowym prawem autorskim i znajduje się " \ @@ -83,8 +83,13 @@ def transform(wldoc, flags=None, **options): contributors = "\n\nOpracowanie redakcyjne i przypisy: %s." % contributors funders = ', '.join(parsed_dc.funders) if funders: - funders = u"\n\nPublikację ufundowali i ufundowały: %s." % funders + funders = u"\n\nPublikację wsparli i wsparły: %s." % funders publisher = '\n\nWydawca: ' + ', '.join(parsed_dc.publisher) + isbn = getattr(parsed_dc, 'isbn_txt', None) + if isbn: + isbn = '\n\n' + isbn + else: + isbn = '' 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 = "" + isbn = "" result = (TEMPLATE % { 'description': description, 'url': url, @@ -102,6 +108,7 @@ def transform(wldoc, flags=None, **options): 'contributors': contributors, 'funders': funders, 'publisher': publisher, + 'isbn': isbn, }).encode('utf-8') else: result = unicode(result).encode('utf-8')