import os;
import dircache;
import sys;
+import urllib
os.chdir(sys.argv[1])
def getLabel(self, v):
if self.type == "clck": return v+" MHz"
- elif self.type == "test": return "<a href='%s.sh.html'>%s</a>"%(v, v)
+ elif self.type == "test": return "<a href='%s.sh.html'>%s</a>"%(urllib.quote(v), v)
else: return v
for ps in pagesets:
print >>html, "View only %s: " % str(ps.values)
for v in ps.values:
- print >>html, "<a href='%s-%s.html'>%s</a> | "%(ps.values.type, v, v)
+ print >>html, "<a href='%s-%s.html'>%s</a> | "%(ps.values.type, urllib.quote(v), v)
print >>html, "<br>"
print >>html, "<table><thead><tr><td> </td>"
for x in self.xvals.labels():
- print >>html, "<td>%s</td>" % x
+ print >>html, "<th>%s</th>" % x
print >>html, "</tr></thead>"
for y in self.yvals:
print >>html, "<tr><td>%s</td>" % self.yvals.getLabel(y)
dthumb = d+"thumb"
try:
for img in dircache.listdir(dthumb):
- print >>html, "<a href='%s/%s'><img src='%s/thumb/%s'></a>" % (d, img, d, img)
+ print >>html, "<a href='%s/%s'><img src='%s/thumb/%s'></a>" % (urllib.quote(d), img, urllib.quote(d), img)
except OSError:
print "warning: no images in %s?"%dthumb
print >>html, "</td>"