1
0
mirror of https://github.com/ciromattia/kcc synced 2026-01-27 23:47:41 +00:00

Don't create blank-page records for older Kindle.

This commit is contained in:
Paweł Jastrzębski
2013-03-04 16:21:12 +01:00
parent 0398d7bf93
commit 8802c24ad0

View File

@@ -192,7 +192,8 @@ def buildOPF(profile, dstdir, title, filelist, cover=None, righttoleft=False):
mt = 'image/jpeg'
f.write("<item id=\"img_" + uniqueid + "\" href=\"" + os.path.join(folder, path[1]) + "\" media-type=\""
+ mt + "\"/>\n")
f.write("<item id=\"blank-page\" href=\"Text\\blank.html\" media-type=\"application/xhtml+xml\"/>\n")
if options.profile == 'K4' or options.profile == 'KHD':
f.write("<item id=\"blank-page\" href=\"Text\\blank.html\" media-type=\"application/xhtml+xml\"/>\n")
f.write("</manifest>\n<spine toc=\"ncx\">\n")
for entry in reflist:
if entry.endswith("-1"):
@@ -321,7 +322,8 @@ def genEpubStruct(path):
alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key)]
filelist.sort(key=lambda name: (alphanum_key(name[0].lower()), alphanum_key(name[1].lower())))
buildOPF(options.profile, path, options.title, filelist, cover, options.righttoleft)
filelist.append(buildBlankHTML(os.path.join(path, 'OEBPS', 'Text')))
if options.profile == 'K4' or options.profile == 'KHD':
filelist.append(buildBlankHTML(os.path.join(path, 'OEBPS', 'Text')))
def getWorkFolder(afile):