GitLogParser.js
authorAlan Knowles <alan@roojs.com>
Mon, 3 Apr 2017 03:42:32 +0000 (11:42 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 3 Apr 2017 03:42:32 +0000 (11:42 +0800)
GitLogParser.js

index 5ad4c92..e6302f5 100644 (file)
@@ -254,10 +254,17 @@ for (var h in GitLogParser.shours) {
         print ("  " + r.tot + "   : " + r.desc);
     });
 }
-
-for (var desc in totals) {
-       print ("  " + totals[desc] + "   : " + desc);
+print("\n\n" + h+': Totals (' + htot +')');
+var hsum = [];
+for (var desc in totals) {    
+    hsum.push({ desc : desc, tot : totals[desc] });
 }
+hsum.sort(function(a,b) { if (a.tot == b.tot) { return 0; } return a.tot < b.tot ? 1 : -1 });
+print("\n\nDay Total (" + htot +')');
+hsum.forEach(function(r) {
+    print ("  " + r.tot + "   : " + r.desc);
+});
 
 //print(JSON.stringify(GitLogParser.shours,null,4));