bookmarks/active_hours.sh

6 lines
244 B
Bash
Raw Permalink Normal View History

2019-11-22 22:43:55 +00:00
#!/usr/bin/env bash
2019-07-22 18:21:22 +00:00
git log --author="Morgan" \
--format="%ad" \
--date="format:%H" |\
awk '{n=$1+0;if(H[n]++>max)max=H[n]}END{for(i=0;i<24;i++){printf"%02d -%5d ",i,H[i];for(n=0;n<H[i]/max*50;n++){printf "*"}print""}}'