cover = WLCover
cover_file = StringIO()
- bound_cover = cover(document.book_info)
- bound_cover.save(cover_file)
- cover_name = 'cover.%s' % bound_cover.ext()
- zip.writestr(os.path.join('OPS', cover_name), cover_file.getvalue())
+ c = cover(document.book_info)
+ c.save(cover_file)
+ c_name = 'cover.%s' % c.ext()
+ zip.writestr(os.path.join('OPS', c_name), cover_file.getvalue())
del cover_file
cover_tree = etree.parse(get_resource('epub/cover.html'))
zip.writestr('OPS/annotations.html', etree.tostring(
html_tree, method="html", pretty_print=True))
- toc.add("Weprzyj Wolne Lektury", "support.html")
- manifest.append(etree.fromstring(
- '<item id="support" href="support.html" media-type="application/xhtml+xml" />'))
- spine.append(etree.fromstring(
- '<itemref idref="support" />'))
- html_string = open(get_resource('epub/support.html')).read()
- chars.update(used_chars(etree.fromstring(html_string)))
- zip.writestr('OPS/support.html', html_string)
+ # toc.add("Weprzyj Wolne Lektury", "support.html")
+ # manifest.append(etree.fromstring(
+ # '<item id="support" href="support.html" media-type="application/xhtml+xml" />'))
+ # spine.append(etree.fromstring(
+ # '<itemref idref="support" />'))
+ # html_string = open(get_resource('epub/support.html')).read()
+ # chars.update(used_chars(etree.fromstring(html_string)))
+ # zip.writestr('OPS/support.html', html_string)
toc.add("Strona redakcyjna", "last.html")
manifest.append(etree.fromstring(