From fc614c6d509925b114b0d23ec8f3f392fb8c77e5 Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Fri, 7 Sep 2007 10:29:50 +0300 Subject: [PATCH] authors: added "Next top 5" column to author of month/year. Only names are shown for the next 5. --- doc/TODO.txt | 2 -- gitstats | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/TODO.txt b/doc/TODO.txt index a3697da..d8ad775 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -36,10 +36,8 @@ - Lines - Position by nrof commits - (T) Author of Month - - Places 2-N ? - Lines - (T) Author of Year - - Places 2-N - Lines - Files diff --git a/gitstats b/gitstats index 9db152d..e6077fc 100755 --- a/gitstats +++ b/gitstats @@ -536,24 +536,26 @@ class HTMLReportCreator(ReportCreator): # Authors :: Author of Month f.write(html_header(2, 'Author of Month')) f.write('') - f.write('') + f.write('') for yymm in reversed(sorted(data.author_of_month.keys())): authordict = data.author_of_month[yymm] authors = getkeyssortedbyvalues(authordict) authors.reverse() commits = data.author_of_month[yymm][authors[0]] - f.write('' % (yymm, authors[0], commits, (100 * commits) / data.commits_by_month[yymm], data.commits_by_month[yymm])) + next = ', '.join(authors[1:5]) + f.write('' % (yymm, authors[0], commits, (100 * commits) / data.commits_by_month[yymm], data.commits_by_month[yymm], next)) f.write('
MonthAuthorCommits (%)
MonthAuthorCommits (%)Next top 5
%s%s%d (%.2f%% of %d)
%s%s%d (%.2f%% of %d)%s
') f.write(html_header(2, 'Author of Year')) - f.write('') + f.write('
YearAuthorCommits (%)
') for yy in reversed(sorted(data.author_of_year.keys())): authordict = data.author_of_year[yy] authors = getkeyssortedbyvalues(authordict) authors.reverse() commits = data.author_of_year[yy][authors[0]] - f.write('' % (yy, authors[0], commits, (100 * commits) / data.commits_by_year[yy], data.commits_by_year[yy])) + next = ', '.join(authors[1:5]) + f.write('' % (yy, authors[0], commits, (100 * commits) / data.commits_by_year[yy], data.commits_by_year[yy], next)) f.write('
YearAuthorCommits (%)Next top 5
%s%s%d (%.2f%% of %d)
%s%s%d (%.2f%% of %d)%s
') f.write('') -- 2.11.4.GIT