How do I get a list of all the GitHub projects I've contributed to in the last year?

<>

This question already has an answer here:

Answers


Thanks to a tweet from @caged, I wrote this Perl script to iterate over months in my contributions:

use v5.12;
use warnings;
use utf8;
my $uname = 'theory';

my %projects;
for my $year (2012..2014) {
    for my $month (1..12) {
        last if $year == 2014 && $month > 1;
        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;

Yeah, HTML scraping is kind of ugly, but did the trick for my needs.


Need Your Help

A better alternative to Jersey/Jackson for building JSON REST APIs?

java json rest jersey jackson

I need to build the server side of a JSON-REST API, and I've been playing with Jersey to do it (using it's JSON-POJO mapping feature).

Prompt Dialog in Windows Forms

c# .net winforms dialog prompt

I am using System.Windows.Forms but strangely enough don't have the ability to create them.