|
|
@@ -243,10 +243,11 @@ class GitDataCollector(DataCollector):
|
|
243
|
243
|
|
|
244
|
244
|
commits = a['commits']
|
|
245
|
245
|
commits_frac = (100 * float(commits)) / self.getTotalCommits()
|
|
246
|
|
- date_first = datetime.datetime.fromtimestamp(a['first_commit_stamp']).strftime('%Y-%m-%d')
|
|
247
|
|
- date_last = datetime.datetime.fromtimestamp(a['last_commit_stamp']).strftime('%Y-%m-%d')
|
|
|
246
|
+ date_first = datetime.datetime.fromtimestamp(a['first_commit_stamp'])
|
|
|
247
|
+ date_last = datetime.datetime.fromtimestamp(a['last_commit_stamp'])
|
|
|
248
|
+ delta = date_last - date_first
|
|
248
|
249
|
|
|
249
|
|
- res = { 'commits': commits, 'commits_frac': commits_frac, 'date_first': date_first, 'date_last': date_last }
|
|
|
250
|
+ res = { 'commits': commits, 'commits_frac': commits_frac, 'date_first': date_first.strftime('%Y-%m-%d'), 'date_last': date_last.strftime('%Y-%m-%d'), 'timedelta' : delta }
|
|
250
|
251
|
return res
|
|
251
|
252
|
|
|
252
|
253
|
def getAuthors(self):
|
|
|
@@ -451,15 +452,17 @@ class HTMLReportCreator(ReportCreator):
|
|
451
|
452
|
f.write('<h1>Authors</h1>')
|
|
452
|
453
|
self.printNav(f)
|
|
453
|
454
|
|
|
|
455
|
+ # Authors :: List of authors
|
|
454
|
456
|
f.write('\n<h2>List of authors</h2>\n\n')
|
|
455
|
457
|
|
|
456
|
458
|
f.write('<table class="authors">')
|
|
457
|
|
- f.write('<tr><th>Author</th><th>Commits (%)</th><th>First commit</th><th>Last commit</th></tr>')
|
|
|
459
|
+ f.write('<tr><th>Author</th><th>Commits (%)</th><th>First commit</th><th>Last commit</th><th>Age</th></tr>')
|
|
458
|
460
|
for author in sorted(data.getAuthors()):
|
|
459
|
461
|
info = data.getAuthorInfo(author)
|
|
460
|
|
- f.write('<tr><td>%s</td><td>%d (%.2f%%)</td><td>%s</td><td>%s</td></tr>' % (author, info['commits'], info['commits_frac'], info['date_first'], info['date_last']))
|
|
|
462
|
+ f.write('<tr><td>%s</td><td>%d (%.2f%%)</td><td>%s</td><td>%s</td><td>%s</td></tr>' % (author, info['commits'], info['commits_frac'], info['date_first'], info['date_last'], info['timedelta']))
|
|
461
|
463
|
f.write('</table>')
|
|
462
|
464
|
|
|
|
465
|
+ # Authors :: Author of Month
|
|
463
|
466
|
f.write('\n<h2>Author of Month</h2>\n\n')
|
|
464
|
467
|
f.write('<table>')
|
|
465
|
468
|
f.write('<tr><th>Month</th><th>Author</th><th>Commits (%)</th></tr>')
|