- mime.extra = ''
- zip.writestr(mime, 'application/epub+zip')
- zip.writestr('META-INF/container.xml', '<?xml version="1.0" ?><container version="1.0" ' \
- 'xmlns="urn:oasis:names:tc:opendocument:xmlns:container">' \
- '<rootfiles><rootfile full-path="OPS/content.opf" ' \
- 'media-type="application/oebps-package+xml" />' \
- '</rootfiles></container>')
- zip.write(get_resource('res/wl-logo-small.png'), os.path.join('OPS', 'logo_wolnelektury.png'))
- zip.write(get_resource('res/jedenprocent.png'), os.path.join('OPS', 'jedenprocent.png'))
+ mime.extra = b''
+ zip.writestr(mime, b'application/epub+zip')
+ zip.writestr(
+ 'META-INF/container.xml',
+ b'<?xml version="1.0" ?>'
+ b'<container version="1.0" '
+ b'xmlns="urn:oasis:names:tc:opendocument:xmlns:container">'
+ b'<rootfiles><rootfile full-path="OPS/content.opf" '
+ b'media-type="application/oebps-package+xml" />'
+ b'</rootfiles></container>'
+ )
+ zip.write(get_resource('res/wl-logo-small.png'),
+ os.path.join('OPS', 'logo_wolnelektury.png'))
+ zip.write(get_resource('res/jedenprocent.png'),
+ os.path.join('OPS', 'jedenprocent.png'))