Occasionally I come across git repositories where I want to know how active they are and who the main developers are.
Let’s develop a script that plots the commit history, and explore how to use Python modules in Perl 6.
12.1 Extracting the Stats
We want to plot the number of commits by author and date. We can get this information easily by passing some options to git log:
my $proc = run :out, <git log --date=short --pretty=format:%ad!%an>;
my (%total, %by-author, %dates);
for $proc.out.lines -> $line {
my ( $date, $author ) = $line.split: '!', 2;
%total{$author}++; ...