X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/45ce20d1189ea2042a097bfd9ab7b4b6e96be324..141733d3db8c11f1eb69a9c0195f07c3c2ed3f8f:/librarian/epub.py?ds=sidebyside diff --git a/librarian/epub.py b/librarian/epub.py index 8ef436e..bf58a9f 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -502,8 +502,10 @@ def transform(wldoc, verbose=False, document.edoc.getroot().set(flag, 'yes') # add editors info - document.edoc.getroot().set('editors', u', '.join(sorted( - editor.readable() for editor in document.editors()))) + editors = document.editors() + if editors: + document.edoc.getroot().set('editors', u', '.join(sorted( + editor.readable() for editor in editors))) if document.book_info.funders: document.edoc.getroot().set('funders', u', '.join( document.book_info.funders)) @@ -518,6 +520,8 @@ def transform(wldoc, verbose=False, output_file = NamedTemporaryFile(prefix='librarian', suffix='.epub', delete=False) zip = zipfile.ZipFile(output_file, 'w', zipfile.ZIP_DEFLATED) + functions.reg_mathml_epub(zip) + # write static elements mime = zipfile.ZipInfo() mime.filename = 'mimetype'