1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-28 00:52:27 +00:00

Revert to POSIX path - win7 kindlegen seems to want them

This commit is contained in:
Ciro Mattia Gonano
2013-03-05 19:25:00 +01:00
parent 074e31cb2e
commit 95e7329abf

View File

@@ -179,13 +179,13 @@ def buildOPF(profile, dstdir, title, filelist, cover=None, righttoleft=False):
uniqueid = os.path.join(folder, filename[0]).replace('/', '_').replace('\\', '_')
reflist.append(uniqueid)
f.write("<item id=\"page_" + uniqueid + "\" href=\""
+ os.path.join(folder.replace('Images', 'Text'), filename[0])
+ folder.replace('Images', 'Text') + "/" + filename[0]
+ ".html\" media-type=\"application/xhtml+xml\"/>\n")
if '.png' == filename[1]:
mt = 'image/png'
else:
mt = 'image/jpeg'
f.write("<item id=\"img_" + uniqueid + "\" href=\"" + os.path.join(folder, path[1]) + "\" media-type=\""
f.write("<item id=\"img_" + uniqueid + "\" href=\"" + folder + "/" + path[1] + "\" media-type=\""
+ mt + "\"/>\n")
if (options.profile == 'K4' or options.profile == 'KHD') and splitCount > 0:
splitCountUsed = 1