Parse cbr files

This commit is contained in:
BasioMeusPuga
2017-11-17 00:30:56 +05:30
parent 3f09c5afb9
commit 10dcc14fd0
12 changed files with 4347 additions and 16 deletions

View File

@@ -56,13 +56,9 @@ class ParseCBZ:
def get_contents(self):
# TODO
# Image resizing, formatting
# Include this as a collection of absolute paths only
# Post processing can be carried out by the program
# CBZ files containing multiple directories for multiple chapters
file_settings = {
'temp_dir': self.temp_dir,
'images_only': True}
extract_path = os.path.join(self.temp_dir, self.file_md5)
@@ -90,10 +86,9 @@ class ParseCBZ:
found_images.sort()
for count, i in enumerate(found_images):
page_name = 'Page ' + str(count)
page_name = 'Page ' + str(count + 1)
image_path = os.path.join(extract_path, image_dir, i)
contents[page_name] = image_path
# contents[page_name] = "<img src='%s' align='middle'/>" % image_path
return contents, file_settings