diff --git a/epubfile.py b/epubfile.py index ae88760..1451f8a 100644 --- a/epubfile.py +++ b/epubfile.py @@ -88,9 +88,10 @@ NCX_TEMPLATE = ''' - Unknown + {title} +{navpoints} '''.strip() @@ -105,8 +106,7 @@ NAV_XHTML_TEMPLATE = ''' @@ -314,8 +314,8 @@ class Epub: writefile(root.join('mimetype'), MIMETYPE_FILE_TEMPLATE) writefile(root.join('META-INF/container.xml'), CONTAINER_XML_TEMPLATE) writefile(root.join('OEBPS/content.opf'), OPF_TEMPLATE.format(uuid=uid)) - writefile(root.join('OEBPS/toc.ncx'), NCX_TEMPLATE.format(uuid=uid)) - writefile(root.join('OEBPS/Text/nav.xhtml'), NAV_XHTML_TEMPLATE) + writefile(root.join('OEBPS/toc.ncx'), NCX_TEMPLATE.format(uuid=uid, title='Unknown', navpoints='')) + writefile(root.join('OEBPS/Text/nav.xhtml'), NAV_XHTML_TEMPLATE.format(toc_contents='')) return cls(tempdir)