1
0
mirror of https://github.com/ciromattia/kcc synced 2026-06-10 16:40:30 +00:00

Compare commits

...

5 Commits

Author SHA1 Message Date
dependabot[bot] 40893f1adb Update distro requirement from >=1.8.0 to >=1.9.0
Updates the requirements on [distro](https://github.com/python-distro/distro) to permit the latest version.
- [Release notes](https://github.com/python-distro/distro/releases)
- [Changelog](https://github.com/python-distro/distro/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-distro/distro/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: distro
  dependency-version: 1.9.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-01 01:45:13 +00:00
Alex Xu b4ef37dbb9 bump Windows 7 numpy (#1362) 2026-05-31 18:43:10 -07:00
Alex Xu b95cf6e179 ignore exceptions when epub parsing (#1360)
* ignore exceptions when epub parsing

* Update comic2ebook.py

* Update comic2ebook.py
2026-05-26 09:13:22 -07:00
フィルターペーパー 08070cdd97 Fix fusion output location (#1355)
* Fix fusion output location

Use source folder when output folder is not specified

* undelete things
2026-05-25 16:41:36 -07:00
Alex Xu df3d174437 fusion temp file cleanup improvements (#1359) 2026-05-25 14:52:08 -07:00
6 changed files with 22 additions and 29 deletions
+3 -7
View File
@@ -393,7 +393,10 @@ class WorkerThread(QThread):
for job in currentJobs:
bookDir.append(job)
try:
fusion_source_parent = str(Path(bookDir[0]).parent)
comic2ebook.options = comic2ebook.checkOptions(copy(options))
if options.output is None:
options.output = fusion_source_parent
currentJobs.clear()
currentJobs.append(comic2ebook.makeFusion(bookDir))
MW.addMessage.emit('Created fusion at ' + currentJobs[0], 'info', False)
@@ -557,13 +560,6 @@ class WorkerThread(QThread):
move(item, GUI.targetDirectory)
except Exception:
pass
if options.filefusion:
for path in currentJobs:
if os.path.isfile(path):
os.remove(path)
elif os.path.isdir(path):
rmtree(path, True)
comic2ebook.checkPre('LLL-')
GUI.progress.content = ''
GUI.progress.stop()
MW.hideProgressBar.emit()
+14 -17
View File
@@ -76,23 +76,19 @@ def main(argv=None):
print('No matching files found.')
return 1
if options.filefusion:
fusion_source_parent = str(Path(sources[0]).parent)
fusion_path = makeFusion(list(sources))
sources.clear()
sources.append(fusion_path)
for source in sources:
source = source.rstrip('\\').rstrip('/')
options = copy(args)
if options.filefusion and options.output is None:
options.output = fusion_source_parent
options = checkOptions(options)
print('Working on ' + source + '...')
makeBook(source)
if options.filefusion:
for path in sources:
if os.path.isfile(path):
os.remove(path)
elif os.path.isdir(path):
rmtree(path, True)
checkPre('LLL-')
return 0
@@ -979,10 +975,11 @@ def getWorkFolder(afile, workdir=None):
manifest_dict[manifest_item.attrib.get('id')] = manifest_item.attrib.get('href')
ordered_image_paths = []
for i, spine_item in enumerate(spine):
if spine_item not in manifest_dict:
try:
page_path = os.path.join(os.path.dirname(opf_path), manifest_dict[spine_item])
page = ET.parse(page_path)
except Exception:
continue
page_path = os.path.join(os.path.dirname(opf_path), manifest_dict[spine_item])
page = ET.parse(page_path)
imgs = page.findall(r'.//{*}img') + page.findall(r'.//{*}image')
largest_size = 0
@@ -1690,8 +1687,8 @@ def makeFusion(sources: List[str]):
raise UserWarning('Fusion requires at least 2 sources. Did you forget to uncheck fusion?')
start = perf_counter()
first_path = Path(sources[0])
if True:
if options.tempdir:
fusion_parent = first_path.parent
else:
# LLL is after KCC
@@ -1899,11 +1896,11 @@ def makeBook(source, qtgui=None, job_progress=''):
end = perf_counter()
print(f"{job_progress}makeBook: {end - start} seconds")
# Clean up temporary workspace
try:
rmtree(path, True)
except Exception:
pass
if options.filefusion:
rmtree(source, True)
checkPre('LLL-')
return filepath
+1 -1
View File
@@ -5,7 +5,7 @@ python-slugify>=8.0.4
packaging>=26.2
mozjpeg-lossless-optimization>=1.2.0
natsort>=8.4.0
distro>=1.8.0
distro>=1.9.0
# Below requirements are compiled in Dockefile
# numpy==2.3.4
# PyMuPDF==1.26.6
+1 -1
View File
@@ -6,6 +6,6 @@ python-slugify>=8.0.4
packaging>=26.2
mozjpeg-lossless-optimization>=1.2.0
natsort>=8.4.0
distro>=1.8.0
distro>=1.9.0
numpy<2
PyMuPDF==1.25.5
+2 -2
View File
@@ -6,6 +6,6 @@ python-slugify>=8.0.4
packaging>=26.2
mozjpeg-lossless-optimization>=1.2.0
natsort>=8.4.0
distro>=1.8.0
numpy==1.23.0
distro>=1.9.0
numpy==1.23.5
PyMuPDF>=1.16
+1 -1
View File
@@ -6,6 +6,6 @@ python-slugify>=8.0.4,<9.0.0
packaging>=26.2
mozjpeg-lossless-optimization>=1.2.0
natsort>=8.4.0
distro>=1.8.0
distro>=1.9.0
numpy>=1.22.4
PyMuPDF>=1.18.0