daca2: write number of error,warning,performance,portability,style in report

This commit is contained in:
Daniel Marjamäki 2013-11-24 10:47:12 +01:00
parent 72111d0292
commit 02c299405b
1 changed files with 19 additions and 3 deletions

View File

@ -40,7 +40,8 @@ mainpage.write('<html lang="en">\n')
mainpage.write('<head>\n') mainpage.write('<head>\n')
mainpage.write('<meta charset="utf-8">\n') mainpage.write('<meta charset="utf-8">\n')
mainpage.write('<title>DACA2</title>\n') mainpage.write('<title>DACA2</title>\n')
mainpage.write('<style>td { font-size: 0.9em; } td + td { padding-left: 6em; }</style>\n') mainpage.write(
'<style>td { font-size: 0.9em; } td + td { padding-left: 6em; }</style>\n')
mainpage.write('</head>\n') mainpage.write('</head>\n')
mainpage.write('<body>\n') mainpage.write('<body>\n')
mainpage.write('<h1>DACA2</h1>\n') mainpage.write('<h1>DACA2</h1>\n')
@ -51,7 +52,14 @@ mainpage.write(
mainpage.write('<p>The hardware running the analysis is a Raspberry PI.</p>\n') mainpage.write('<p>The hardware running the analysis is a Raspberry PI.</p>\n')
mainpage.write('<table>\n') mainpage.write('<table>\n')
mainpage.write( mainpage.write(
'<tr><td>Name</td><td>Date</td></tr>\n') '<tr>' +
'<td>Name</td>' +
'<td>Date</td>' +
'<td>Error</td>' +
'<td>Warning</td>' +
'<td>Performance</td>' +
'<td>Portability</td>' +
'<td>Style</td></tr>\n')
lastupdate = None lastupdate = None
recent = [] recent = []
@ -75,7 +83,15 @@ for lib in range(2):
recent.append(a) recent.append(a)
mainpage.write( mainpage.write(
'<tr><td><a href="daca2-' + a + '.html">' + a + '</a></td><td>' + datestr + '</td></tr>\n') '<tr>' +
'<td><a href="daca2-' + a + '.html">' + a + '</a></td>' +
'<td>' + datestr + '</td>' +
'<td>' + str(data.count('(error)')) + '</td>' +
'<td>' + str(data.count('(warning)')) + '</td>' +
'<td>' + str(data.count('(performance)')) + '</td>' +
'<td>' + str(data.count('(portability)')) + '</td>' +
'<td>' + str(data.count('(style)')) + '</td>' +
'</tr>\n')
data = data.replace('&', '&amp;') data = data.replace('&', '&amp;')
data = data.replace('<', '&lt;') data = data.replace('<', '&lt;')