|
|
@@ -339,16 +339,20 @@ class HTMLReportCreator(ReportCreator):
|
|
339
|
339
|
f.write('<img src="day_of_week.png" />')
|
|
340
|
340
|
fp.close()
|
|
341
|
341
|
|
|
342
|
|
- # TODO Month of Year
|
|
|
342
|
+ # Month of Year
|
|
343
|
343
|
f.write('\n<h2>Month of Year</h2>\n\n')
|
|
344
|
344
|
f.write('<div class="vtable"><table>')
|
|
345
|
345
|
f.write('<tr><th>Month</th><th>Commits (%)</th></tr>')
|
|
|
346
|
+ fp = open (path + '/month_of_year.dat', 'w')
|
|
346
|
347
|
for mm in range(1, 13):
|
|
347
|
348
|
commits = 0
|
|
348
|
349
|
if mm in data.activity_by_month_of_year:
|
|
349
|
350
|
commits = data.activity_by_month_of_year[mm]
|
|
350
|
351
|
f.write('<tr><td>%d</td><td>%d (%.2f %%)</td></tr>' % (mm, commits, (100.0 * commits) / data.getTotalCommits()))
|
|
|
352
|
+ fp.write('%d %d\n' % (mm, commits))
|
|
|
353
|
+ fp.close()
|
|
351
|
354
|
f.write('</table></div>')
|
|
|
355
|
+ f.write('<img src="month_of_year.png" />')
|
|
352
|
356
|
|
|
353
|
357
|
# Commits by year/month
|
|
354
|
358
|
f.write('<h2>Commits by year/month</h2>')
|
|
|
@@ -497,6 +501,20 @@ plot 'day_of_week.dat' using 1:2:(0.5) w boxes fs solid
|
|
497
|
501
|
""")
|
|
498
|
502
|
f.close()
|
|
499
|
503
|
|
|
|
504
|
+ # Month of Year
|
|
|
505
|
+ f = open(path + '/month_of_year.plot', 'w')
|
|
|
506
|
+ f.write(GNUPLOT_COMMON)
|
|
|
507
|
+ f.write(
|
|
|
508
|
+"""
|
|
|
509
|
+set output 'month_of_year.png'
|
|
|
510
|
+unset key
|
|
|
511
|
+set xrange [0.5:12.5]
|
|
|
512
|
+set xtics 1
|
|
|
513
|
+set ylabel "Commits"
|
|
|
514
|
+plot 'month_of_year.dat' using 1:2:(0.5) w boxes fs solid
|
|
|
515
|
+""")
|
|
|
516
|
+ f.close()
|
|
|
517
|
+
|
|
500
|
518
|
# commits_by_year_month
|
|
501
|
519
|
f = open(path + '/commits_by_year_month.plot', 'w')
|
|
502
|
520
|
f.write(GNUPLOT_COMMON)
|
|
|
@@ -528,11 +546,10 @@ plot 'commits_by_year.dat' using 1:2:(0.5) w boxes fs solid
|
|
528
|
546
|
f.close()
|
|
529
|
547
|
|
|
530
|
548
|
os.chdir(path)
|
|
531
|
|
- for i in ('hour_of_day', 'day_of_week', 'commits_by_year_month', 'commits_by_year'):
|
|
|
549
|
+ for i in ('hour_of_day', 'day_of_week', 'month_of_year', 'commits_by_year_month', 'commits_by_year'):
|
|
|
550
|
+ print '>> gnuplot %s.plot' % i
|
|
532
|
551
|
os.system('gnuplot %s.plot' % i)
|
|
533
|
552
|
|
|
534
|
|
- pass
|
|
535
|
|
-
|
|
536
|
553
|
def printHeader(self, f):
|
|
537
|
554
|
f.write("""<html>
|
|
538
|
555
|
<head>
|