Selaa lähdekoodia

authors: added "Next top 5" column to author of month/year.

Only names are shown for the next 5.
Heikki Hokkanen 18 vuotta sitten
vanhempi
commit
fc614c6d50
2 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 0
    2
      doc/TODO.txt
  2. 6
    4
      gitstats

+ 0
- 2
doc/TODO.txt Näytä tiedosto

@@ -36,10 +36,8 @@
36 36
 		- Lines
37 37
 		- Position by nrof commits
38 38
 	- (T) Author of Month
39
-		- Places 2-N ?
40 39
 		- Lines
41 40
 	- (T) Author of Year
42
-		- Places 2-N
43 41
 		- Lines
44 42
 
45 43
 - Files

+ 6
- 4
gitstats Näytä tiedosto

@@ -536,24 +536,26 @@ class HTMLReportCreator(ReportCreator):
536 536
 		# Authors :: Author of Month
537 537
 		f.write(html_header(2, 'Author of Month'))
538 538
 		f.write('<table>')
539
-		f.write('<tr><th>Month</th><th>Author</th><th>Commits (%)</th></tr>')
539
+		f.write('<tr><th>Month</th><th>Author</th><th>Commits (%)</th><th>Next top 5</th></tr>')
540 540
 		for yymm in reversed(sorted(data.author_of_month.keys())):
541 541
 			authordict = data.author_of_month[yymm]
542 542
 			authors = getkeyssortedbyvalues(authordict)
543 543
 			authors.reverse()
544 544
 			commits = data.author_of_month[yymm][authors[0]]
545
-			f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td></tr>' % (yymm, authors[0], commits, (100 * commits) / data.commits_by_month[yymm], data.commits_by_month[yymm]))
545
+			next = ', '.join(authors[1:5])
546
+			f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td><td>%s</td></tr>' % (yymm, authors[0], commits, (100 * commits) / data.commits_by_month[yymm], data.commits_by_month[yymm], next))
546 547
 
547 548
 		f.write('</table>')
548 549
 
549 550
 		f.write(html_header(2, 'Author of Year'))
550
-		f.write('<table><tr><th>Year</th><th>Author</th><th>Commits (%)</th></tr>')
551
+		f.write('<table><tr><th>Year</th><th>Author</th><th>Commits (%)</th><th>Next top 5</th></tr>')
551 552
 		for yy in reversed(sorted(data.author_of_year.keys())):
552 553
 			authordict = data.author_of_year[yy]
553 554
 			authors = getkeyssortedbyvalues(authordict)
554 555
 			authors.reverse()
555 556
 			commits = data.author_of_year[yy][authors[0]]
556
-			f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td></tr>' % (yy, authors[0], commits, (100 * commits) / data.commits_by_year[yy], data.commits_by_year[yy]))
557
+			next = ', '.join(authors[1:5])
558
+			f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td><td>%s</td></tr>' % (yy, authors[0], commits, (100 * commits) / data.commits_by_year[yy], data.commits_by_year[yy], next))
557 559
 		f.write('</table>')
558 560
 
559 561
 		f.write('</body></html>')