Major improvements to epub parser

This commit is contained in:
BasioMeusPuga
2018-03-10 15:56:04 +05:30
parent 51d00bb9b5
commit ed8f676a05
9 changed files with 117 additions and 60 deletions

View File

@@ -81,7 +81,7 @@ class ParseCBZ:
'images_only': True}
extract_path = os.path.join(self.temp_dir, self.file_md5)
contents = collections.OrderedDict()
contents = []
# I'm currently choosing not to keep multiple files in memory
self.book.extractall(extract_path)
@@ -104,6 +104,6 @@ class ParseCBZ:
page_name = 'Page ' + str(count + 1)
image_path = os.path.join(extract_path, i)
contents[page_name] = image_path
contents.append((page_name, image_path))
return contents, file_settings