From 745b995f30fe6c01c6566e8992659cbd421cee1c Mon Sep 17 00:00:00 2001 From: Lukas Mestan Date: Tue, 7 Mar 2017 19:09:36 +0100 Subject: [PATCH] update inline graph --- git-quick-stats | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/git-quick-stats b/git-quick-stats index 2872f4e..5d151d1 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -144,12 +144,13 @@ function commitsByMonth() { } END{ for (month in count) { - s=""; + s="|"; percent = ((count[month] / total) * 100) / 1.25; for (i = 1; i <= percent; ++i) { - s=s"=" + s=s"█" } - printf( "\t%s\t%-0s\t|%s\n", month, count[month], s ); + + printf( "\t%s\t%-0s\t%s\n", month, count[month], s ); } }' | LC_TIME="en_EN.UTF-8" sort -M } @@ -172,12 +173,12 @@ function commitsByWeekday() { END{ for (day in count) { - s=""; + s="|"; percent = ((count[day] / total) * 100) / 1.25; for (i = 1; i <= percent; ++i) { - s=s"=" + s=s"█" } - printf( "\t%s\t%-0s\t|%s\n", day, count[day], s ); + printf( "\t%s\t%-0s\t%s\n", day, count[day], s ); } }' | sort -k 2 -n -r } @@ -195,12 +196,12 @@ function commitsByHour() { } END{ for (hour in count) { - s=""; + s="|"; percent = ((count[hour] / total) * 100) / 1.25; for (i = 1; i <= percent; ++i) { - s=s"=" + s=s"█" } - printf( "\t%s\t%-0s\t|%s\n", hour, count[hour], s ); + printf( "\t%s\t%-0s\t%s\n", hour, count[hour], s ); } }' | sort }