Conversion: Preserve all guide entries that are of a type present in the EPUB 2.0 specification. These entries are used by newer Kindle readers.

This commit is contained in:
Kovid Goyal 2014-04-22 11:21:41 +05:30
parent 3d6204db86
commit 94ce09c753

View File

@ -43,8 +43,12 @@ class Clean(object):
self.oeb.guide.remove('start')
for x in list(self.oeb.guide):
if x.lower() not in {'cover', 'titlepage', 'masthead', 'toc',
'title-page', 'copyright-page', 'text'}:
if x.lower() not in {
'cover', 'titlepage', 'masthead', 'toc', 'title-page',
'copyright-page', 'text', 'index', 'glossary',
'acknowledgements', 'bibliography', 'colophon',
'copyright-page', 'dedication', 'epigraph', 'foreword',
'loi', 'lot', 'notes', 'preface'}:
item = self.oeb.guide[x]
if item.title and item.title.lower() == 'start':
continue