1
0
mirror of https://github.com/ciromattia/kcc synced 2026-06-22 14:30:58 +00:00

time kindlegen (#1365)

This commit is contained in:
Alex Xu
2026-06-18 16:34:52 -07:00
committed by GitHub
parent b4ef37dbb9
commit 1e57da08a9
+3
View File
@@ -1933,8 +1933,11 @@ def makeMOBIWorker(item):
kindlegenError = ''
try:
if os.path.getsize(item) < 629145600:
start = perf_counter()
output = subprocess_run(['kindlegen', '-dont_append_source', '-locale', 'en', item],
stdout=PIPE, stderr=STDOUT, encoding='UTF-8', errors='ignore', check=True)
end = perf_counter()
print(f"kindlegen: {end - start} sec")
else:
# ERROR: EPUB too big
kindlegenErrorCode = 23026