X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/882cbae7275aed205648b3f6167255fb24eb8786..40110cdb916b003da032cb350fad27bd22f64602:/librarian/text.py diff --git a/librarian/text.py b/librarian/text.py index 0761ab0..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ę " \ @@ -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) + 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')