1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-18 20:21:48 +00:00

Fixed HTML template.

Old code produced broken div + wrong src:
<div><img src="../<div><img src="../Images/X/Y.jpg" alt="Y.jpg"
class="singlePage"/></div>
This commit is contained in:
Paweł Jastrzębski
2013-03-03 22:18:10 +01:00
parent 04c3b51f03
commit f5eeb68f79

View File

@@ -47,7 +47,7 @@ def buildHTML(path, imgfile):
if filename is not None: if filename is not None:
htmlpath = '' htmlpath = ''
postfix = '' postfix = ''
backref = 1 backref = 0
head = path head = path
while True: while True:
head, tail = os.path.split(head) head, tail = os.path.split(head)
@@ -68,7 +68,7 @@ def buildHTML(path, imgfile):
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n", "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n",
"</head>\n", "</head>\n",
"<body>\n", "<body>\n",
"<div><img src=\"../" * backref, "Images/", postfix, imgfile, "\" alt=\"", "<div><img src=\"../../" * backref, "Images/", postfix, imgfile, "\" alt=\"",
imgfile, "\" class=\"singlePage\"/></div>\n", imgfile, "\" class=\"singlePage\"/></div>\n",
#"<div id=\"", filename[0], "-1\">\n", #"<div id=\"", filename[0], "-1\">\n",
#"<a class=\"app-amzn-magnify\" data-app-amzn-magnify='{\"targetId\":\"", filename[0], #"<a class=\"app-amzn-magnify\" data-app-amzn-magnify='{\"targetId\":\"", filename[0],