Prints something like this:
In 2018 you made 2488 commits in 134 projects.
The average length of a commit message was 62 characters.
Commits per weekday
    Monday     334 ******************************************
   Tuesday     440 *******************************************************
 Wednesday     464 ***********************************************************
  Thursday     405 ***************************************************
    Friday     364 **********************************************
  Saturday     201 *************************
    Sunday     280 ***********************************
Commits per month
       Jan     160 **********************************
       Feb     199 ******************************************
       Mar     272 **********************************************************
       Apr     260 *******************************************************
       May     274 ***********************************************************
       Jun     216 **********************************************
       Jul     168 ************************************
       Aug     192 *****************************************
       Sep     132 ****************************
       Oct     194 *****************************************
       Nov     243 ****************************************************
       Dec     178 **************************************
Lines added (+) and removed (-) per weekday
    Monday   29655 ++++++++++++++++++++++++
   Tuesday   71311 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Wednesday   65859 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Thursday   46093 ++++++++++++++++++++++++++++++++++++++
    Friday   14724 ++++++++++++
  Saturday    7019 +++++
    Sunday   17739 ++++++++++++++
Lines added (+) and removed (-) per month
       Jan   11195 +++++++
       Feb    6722 ++++
       Mar    6240 +++
       Apr   11334 +++++++
       May   10263 ++++++
       Jun   22041 +++++++++++++
       Jul   24548 +++++++++++++++
       Aug   10521 ++++++
       Sep   39420 ++++++++++++++++++++++++
       Oct    7028 ++++
       Nov    9254 +++++
       Dec   93834 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Top 3 words in commit messages (ignoring words up to three letters)
      into     282 ***********************************************************
    Update     227 ***********************************************
    branch     198 *****************************************
If you keep your sources in ~/src you're all set up. If you like it different, simply invoke the script with the directories your sources live in:
$ ./annual.sh path/to/my/projects another/path
If you commit with more than just one eMail address, set an AUTHORS environment variable before invoking the script:
$ AUTHORS='[email protected] [email protected]' ./annual.sh
If you like to generate the report for a past year, set up YEAR:
$ YEAR=2010 ./annual.sh
If you want to replace "you" in the first line, set WHO:
$ WHO=Markus ./annual.sh
To exclude certain files or folders from line counting, use LOC_EXTRA_ARGS:
$ LOC_EXTRA_ARGS='-- . :(exclude)*folder_to_exclude*' ./annual.sh
To make your setup permanent, simply use your own wrapper script:
#!/usr/bin/env bash
export AUTHORS='...'
export WHO='...'
export LOC_EXTRA_ARGS='...'
./annual.sh "$@"
Pipe the output of annual.sh into a file, say 2018:
$ ./annual.sh > 2018
And you may visualize one or more of those reports with Google Charts using
the enclosed chart.sh script. For example, if you also generated a report
for 2017 you can do:
$ ./chart.sh 2017 2018 > charts.html