- result = doc.xslt(style)
- output_file = codecs.open(output_filename, 'wb', encoding='utf-8')
- output_file.write(unicode(result) % dcparser.parse(input_filename).url)
+ contributors = ', '.join(person.readable() for person in
+ sorted(set(p for p in (parsed_dc.technical_editors + parsed_dc.editors) if p)))
+ if contributors:
+ 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
+ else:
+ description = 'Publikacja zrealizowana w ramach projektu Wolne Lektury (http://wolnelektury.pl).'
+ url = '*' * 10
+ license = ""
+ license_description = ""
+ source = ""
+ contributors = ""
+ funders = ""
+ return OutputFile.from_string((TEMPLATE % {
+ 'description': description,
+ 'url': url,
+ 'license_description': license_description,
+ 'text': unicode(result),
+ 'source': source,
+ 'contributors': contributors,
+ 'funders': funders,
+ }).encode('utf-8'))
+ else:
+ return OutputFile.from_string(unicode(result).encode('utf-8'))