Make page names shorter
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 23:27:34 +0000 (00:27 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 23:27:34 +0000 (00:27 +0100)
gw-tests/genhtml/genhtml.py

index 2398026..db2d5e5 100755 (executable)
@@ -23,6 +23,8 @@ class DimValue(object):
        return "DimValue(%s, %s)" % (repr(self.dim), repr(self.value))
     def htmlTableHeading(self):
        return self.dim.htmlTableHeading(self.value)
+    def index(self):
+        return self.dim.sortedKeys.index(self.value)
 
 class DimValues(list):
     def replace(self, val):
@@ -335,7 +337,7 @@ class Page(object):
        self.tests = tests
     def getName(self):
        return "%s-vs-%s-for-%s.html"%(self.dimy.type, self.dimx.type,
-                                       "-".join([v.value for v in self.valsOther]))
+                                       "-".join(["%02d"%v.index() for v in self.valsOther]))
     def generate(self):
        html = open(self.getName(), "w")
        title = "CAN gateway timing analysis"