Permalink
Browse files

Make build_projects_list.pl aware of the new ecosystem

  • Loading branch information...
1 parent 54d26fa commit c5f7f341c01d2a5292d44fdb2a0b51a63c51d66b @tadzik tadzik committed Apr 16, 2011
Showing with 7 additions and 4 deletions.
  1. +7 −4 web/build-project-list.pl
View
@@ -1,6 +1,7 @@
#!/usr/bin/perl
use strict;
use warnings;
+use 5.010;
use Data::Dumper;
use LWP::Simple;
@@ -17,7 +18,7 @@
local $| = 1;
my $stats = { success => 0, failed => 0, errors => [] };
-my $list_url = 'http://github.com/perl6/ecosystem/raw/master/projects.list';
+my $list_url = 'http://github.com/perl6/ecosystem/raw/master/META.list';
my $site_info = {
'github' => {
@@ -119,9 +120,11 @@
sub get_projects {
my ($list_url) = @_;
my $projects;
- my $contents = eval { read_file('projects.list.local') } || get($list_url);
- for my $line (split "\n", $contents) {
- my ($name, $url) = split ' ', $line;
+ my $contents = eval { read_file('META.list.local') } || get($list_url);
+ for my $proj (split "\n", $contents) {
+ my $json = decode_json encode_utf8 get $proj;
+ my $name = $json->{'name'};
+ my $url = $json->{'source-url'} // $json->{'repo-url'};
my ($auth, $repo_name)
= $url =~ m[git://github.com/([^/]+)/([^.]+).git];
$projects->{$name}->{'home'} = "github";

0 comments on commit c5f7f34

Please sign in to comment.