From 4acfa2d2d7a07c9e13a56518e8db0b2fe0349f80 Mon Sep 17 00:00:00 2001 From: lordwelch Date: Thu, 21 Oct 2021 21:58:20 -0700 Subject: [PATCH] Update build Separate dependencies into files and add optional dependencies Update natsort usage to be compliant with the latest version (#203) Set PyQt5 to 5.15.3, 5.15.4 has issues with pyinstaller Add pyproject.toml with setuptools, isort and black configuration Add optional dependencies (#191) Update README (#174) --- comicapi/comicarchive.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/comicapi/comicarchive.py b/comicapi/comicarchive.py index 11ecd86..d5a39c5 100644 --- a/comicapi/comicarchive.py +++ b/comicapi/comicarchive.py @@ -24,7 +24,7 @@ import platform import time import io -from natsort import natsorted +import natsort from PyPDF2 import PdfFileReader from unrar.cffi import rarfile try: @@ -809,13 +809,9 @@ class ComicArchive: # about case-sensitivity! if sort_list: def keyfunc(k): - # hack to account for some weird scanner ID pages - # basename=os.path.split(k)[1] - # if basename < '0': - # k = os.path.join(os.path.split(k)[0], "z" + basename) return k.lower() - files = natsorted(files, key=keyfunc, signed=False) + files = natsort.natsorted(files, alg=natsort.ns.IC | natsort.ns.I) # make a sub-list of image files self.page_list = []