diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 60b61a3..28744f5 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -828,7 +828,7 @@ def sanitizePermissions(filetree): os.chmod(os.path.join(root, name), S_IWRITE | S_IREAD | S_IEXEC) -def batch_directory(path): +def chunk_directory(path): level = -1 for root, _, files in os.walk(os.path.join(path, 'OEBPS', 'Images')): for f in files: @@ -842,16 +842,16 @@ def batch_directory(path): level = newLevel if level > 0: parent = pathlib.Path(path).parent - batcher = batch_process(os.path.join(path, 'OEBPS', 'Images'), level, parent) + chunker = chunk_process(os.path.join(path, 'OEBPS', 'Images'), level, parent) path = [path] - for tome in batcher: + for tome in chunker: path.append(tome) return path else: raise UserWarning('Unsupported directory structure.') -def batch_process(path, mode, parent): +def chunk_process(path, mode, parent): output = [] currentSize = 0 currentTarget = path @@ -1196,7 +1196,7 @@ def makeBook(source, qtgui=None): GUI.progressBarTick.emit('1') chapterNames = sanitizeTree(os.path.join(path, 'OEBPS', 'Images')) if options.batchsplit > 0: - tomes = batch_directory(path) + tomes = chunk_directory(path) else: tomes = [path] filepath = []