]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - gw-tests/genhtml/genhtml.py
Add a CC license
[can-benchmark.git] / gw-tests / genhtml / genhtml.py
index 051e034ec5c0894085a3cb92c7b440fb9458c254..a5114f1dca453f2ff1369e13581860d65c92959a 100755 (executable)
@@ -6,8 +6,10 @@ import sys;
 import urllib
 import traceback
 import glob
+import datetime
 
-html_copyright = """<div style="font-size: small; color: gray; margin-top: 1em;">Authors: Michal Sojka, Pavel Píša, Copyright © 2010, 2011 Czech Technical University in Prague</div>"""
+html_copyright = """<div style="font-size: small; color: gray; margin-top: 1em;">Authors: Michal Sojka, Pavel Píša, Martin Hořeňovský, Copyright © 2010-%d Czech Technical University in Prague.<br />
+<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0; vertical-align:text-bottom;" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png" /></a> This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div>""" % datetime.date.today().year
 
 class DimValue(object):
     def __new__(cls, dim, value):
@@ -334,7 +336,7 @@ h4 { margin: 0; }
             print test.path
             test.generateHtml()
 
-       os.system("source-highlight -d --output-dir=. ../*.sh > /dev/null")
+       os.system("source-highlight -d --output-dir=. %s/*.sh > /dev/null" % sh_dir)
 
 class Page(object):
     def __init__(self, dimPair, valsOther, tests):
@@ -407,6 +409,7 @@ class Page(object):
 
 if __name__ == "__main__":
     os.chdir(sys.argv[1])
+    sh_dir = sys.argv[2]
     os.system("rm *.html")
     tests = Tests("./", Space(DimensionHostKern(), DimensionKern(), DimensionTraffic(), DimensionLoad(), DimensionTest()))
     tests.generateHtml()