mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
fix landscape alignment (#865)
This commit is contained in:
@@ -358,19 +358,19 @@ def buildOPF(dstdir, title, filelist, cover=None):
|
||||
pageside = "right"
|
||||
for entry in reflist:
|
||||
if options.righttoleft:
|
||||
if entry.endswith("-a"):
|
||||
if entry.endswith("-kcc-a"):
|
||||
f.write(
|
||||
"<itemref idref=\"page_%s\" %s/>\n" % (entry,
|
||||
pageSpreadProperty("center"))
|
||||
)
|
||||
pageside = "right"
|
||||
elif entry.endswith("-b"):
|
||||
elif entry.endswith("-kcc-b"):
|
||||
f.write(
|
||||
"<itemref idref=\"page_%s\" %s/>\n" % (entry,
|
||||
pageSpreadProperty("right"))
|
||||
)
|
||||
pageside = "right"
|
||||
elif entry.endswith("-c"):
|
||||
elif entry.endswith("-kcc-c"):
|
||||
f.write(
|
||||
"<itemref idref=\"page_%s\" %s/>\n" % (entry,
|
||||
pageSpreadProperty("left"))
|
||||
@@ -386,19 +386,19 @@ def buildOPF(dstdir, title, filelist, cover=None):
|
||||
else:
|
||||
pageside = "right"
|
||||
else:
|
||||
if entry.endswith("-a"):
|
||||
if entry.endswith("-kcc-a"):
|
||||
f.write(
|
||||
"<itemref idref=\"page_%s\" %s/>\n" % (entry,
|
||||
pageSpreadProperty("center"))
|
||||
)
|
||||
pageside = "left"
|
||||
elif entry.endswith("-b"):
|
||||
elif entry.endswith("-kcc-b"):
|
||||
f.write(
|
||||
"<itemref idref=\"page_%s\" %s/>\n" % (entry,
|
||||
pageSpreadProperty("left"))
|
||||
)
|
||||
pageside = "left"
|
||||
elif entry.endswith("-c"):
|
||||
elif entry.endswith("-kcc-c"):
|
||||
f.write(
|
||||
"<itemref idref=\"page_%s\" %s/>\n" % (entry,
|
||||
pageSpreadProperty("right"))
|
||||
@@ -544,7 +544,7 @@ def buildEPUB(path, chapternames, tomenumber, ischunked):
|
||||
global_diff = 0
|
||||
|
||||
for x in range(0, pageid + cur_diff + 1):
|
||||
if '-KCC-B' in filelist[x][1]:
|
||||
if '-kcc-b' in filelist[x][1]:
|
||||
pageid += diff_delta
|
||||
global_diff += diff_delta
|
||||
|
||||
|
||||
@@ -285,14 +285,14 @@ class ComicPage:
|
||||
self.rotated = False
|
||||
self.orgPath = os.path.join(path[0], path[1])
|
||||
if 'N' in mode:
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC'
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-kcc'
|
||||
elif 'R' in mode:
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC-A'
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-kcc-a'
|
||||
self.rotated = True
|
||||
elif 'S1' in mode:
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC-B'
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-kcc-b'
|
||||
elif 'S2' in mode:
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC-C'
|
||||
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-kcc-c'
|
||||
# backwards compatibility for Pillow >9.1.0
|
||||
if not hasattr(Image, 'Resampling'):
|
||||
Image.Resampling = Image
|
||||
|
||||
Reference in New Issue
Block a user