From 6f7e1689b7f8175ec16a9faea605997ec95bb5e8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 2 Jan 2013 14:24:13 +0800 Subject: [PATCH] GitLogParser.js --- GitLogParser.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/GitLogParser.js b/GitLogParser.js index a7815482..87ecdf8c 100644 --- a/GitLogParser.js +++ b/GitLogParser.js @@ -223,7 +223,21 @@ for (var h in res) { } } -print(JSON.stringify(GitLogParser.shours,null,4)); +for (var h in GitLogParser.shours) { + var hsum = []; + for (var desc in GitLogParser.shours[h]) { + hsum.push({ desc : desc, tot : (GitLogParser.shours[h][desc]/60000).toFixed(2)*1 }) + } + hsum.sort(function(a,b) { if (a.tot == b.tot) { return 0; } return a.tot > b.tot ? 1 : -1 }); + print(h+':'); + hsum.forEach(function(r) { + print (" " + r.tot + " : " + r.desc); + } +} + + + +//print(JSON.stringify(GitLogParser.shours,null,4)); -- 2.39.2