Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
use v5.12;
use warnings;
use utf8;
my $uname = 'theory';
my ($curr_month, $curr_year) = (gmtime)[4,5];
$curr_year += 1900;
$curr_month += 1;
my %projects;
for my $year (2012..$curr_year) {
for my $month (1..12) {
last if $year == $curr_year && $month > $curr_month;
my $from = sprintf '%4d-%02d-01', $year, $month;
my $to = sprintf '%4d-%02d-01', $month == 12 ? ($year + 1, 1) : ($year, $month + 1);
my $res = `curl 'https://github.com/$uname?tab=contributions&from=$from&to=$to' | grep 'class="title"'`;
while ($res =~ /href="([^"?]+)/g) {
my (undef, $user, $repo) = split m{/} => $1;
$projects{"$user/$repo"}++;
}
}
}
say "$projects{$_}: $_" for sort keys %projects;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.