No files in dir if database not initialised.
[kugel-rb.git] / www / getbugs.pl
blob3f1fd8975788847c05b671082a105d8acc900b97
1 #!/usr/bin/perl
3 @html = `curl --silent "http://sourceforge.net/tracker/?group_id=44306&atid=439118"`;
5 @entries = grep {/HREF=\"\/tracker\/index.php/} @html;
7 print "<table class=bugs>\n";
8 print "<tr><th>submitted</th><th>id</th><th>summary</th><th>submitted by</th><th>assigned to</th></tr>\n";
9 for ( @entries ) {
10 if ( /NOWRAP>(\d+).*?HREF=\"(.*?)\">(.*?)<.*?(nbsp;|\*) (.*?)<.*?\>(\w+)<.*?\>(\w+)</ ) {
11 ($submit, $assigned, $date, $id, $num, $summary) = ($7, $6, $5, $2, $1, $3);
12 $submit = "<a href=http://sourceforge.net/users/$submit>$submit</a>" if ( $submit ne "nobody" );
13 $assigned = "<a href=http://sourceforge.net/users/$assigned>$assigned</a>" if ( $assigned ne "nobody" );
15 print "<tr><td>$date</td><td><a href=\"http://www.sourceforge.net$id\">$num</a></td><td>$summary</td><td>$submit</td><td>$assigned</td></tr>\n";
18 print "</table>\n";