|
|
|
|
|
|
940
|
f.write(html_header(2, 'Commits by Timezone'))
|
940
|
f.write(html_header(2, 'Commits by Timezone'))
|
|
941
|
f.write('<table><tr>')
|
941
|
f.write('<table><tr>')
|
|
942
|
f.write('<th>Timezone</th><th>Commits</th>')
|
942
|
f.write('<th>Timezone</th><th>Commits</th>')
|
|
|
|
943
|
+ f.write('</tr>')
|
|
943
|
max_commits_on_tz = max(data.commits_by_timezone.values())
|
944
|
max_commits_on_tz = max(data.commits_by_timezone.values())
|
|
944
|
for i in sorted(data.commits_by_timezone.keys(), key = lambda n : int(n)):
|
945
|
for i in sorted(data.commits_by_timezone.keys(), key = lambda n : int(n)):
|
|
945
|
commits = data.commits_by_timezone[i]
|
946
|
commits = data.commits_by_timezone[i]
|
|
946
|
r = 127 + int((float(commits) / max_commits_on_tz) * 128)
|
947
|
r = 127 + int((float(commits) / max_commits_on_tz) * 128)
|
|
947
|
f.write('<tr><th>%s</th><td style="background-color: rgb(%d, 0, 0)">%d</td></tr>' % (i, r, commits))
|
948
|
f.write('<tr><th>%s</th><td style="background-color: rgb(%d, 0, 0)">%d</td></tr>' % (i, r, commits))
|
|
948
|
- f.write('</tr></table>')
|
|
|
|
|
|
949
|
+ f.write('</table>')
|
|
949
|
|
950
|
|
|
950
|
f.write('</body></html>')
|
951
|
f.write('</body></html>')
|
|
951
|
f.close()
|
952
|
f.close()
|