From 8802c24ad04a28ebc2ab5d0a3ffba1304d47b097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Mon, 4 Mar 2013 16:21:12 +0100 Subject: [PATCH] Don't create blank-page records for older Kindle. --- kcc/comic2ebook.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 827b5af..bdbd6f6 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -192,7 +192,8 @@ def buildOPF(profile, dstdir, title, filelist, cover=None, righttoleft=False): mt = 'image/jpeg' f.write("\n") - f.write("\n") + if options.profile == 'K4' or options.profile == 'KHD': + f.write("\n") f.write("\n\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):