Created
April 24, 2009 08:02
-
-
Save miyagawa/101019 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Convert GitHub Issues API to RSS feeds using Plagger | |
# script:scripts/github-issues.pl miyagawa/remedie | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use JSON::XS; | |
my $proj = shift @ARGV || "miyagawa/remedie"; | |
my $json = get("http://github.com/api/v2/json/issues/list/$proj/open"); | |
my $data = decode_json $json; | |
my $feed = { | |
title => "GitHub $proj issues", | |
link => "http://github.com/$proj/issues", | |
}; | |
for my $issue (@{$data->{issues}}) { | |
push @{$feed->{entries}}, { | |
title => "$issue->{number}: $issue->{title}", | |
body => $issue->{body}, | |
date => $issue->{updated_at}, | |
link => "http://github.com/$proj/issues/$issue->{number}/find", | |
}; | |
} | |
use YAML; | |
print YAML::Dump $feed; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment