New bugzilla status whiteboard / issues.txt

Michal Jaegermann michal at harddata.com
Sun May 1 18:58:18 UTC 2005


On Sun, May 01, 2005 at 09:36:57AM +0300, Pekka Savola wrote:
> See for example:
> 
> http://netcore.fi/pekkas/buglist.html
> 
> The scripts are attached.

If you will filter an output of 'fetch-bugzilla.pl' by
an attached script then resulting tables are sorted in a numerical
ascending order by bug id's.  Easy to add in 'create-buglist.sh'
or one can pipe through a subprocess in 'fetch-bugzilla.pl'
before showing results.

This relies to an extent on a particular format produced by bugzilla
but I wanted to avoid additional Perl modules for parsing HTML.

   Michal
-------------- next part --------------
#!/usr/bin/perl

use strict;

while (<>) {
  print;
  last if m{</thead>};
}

my $bug_entry = '';
my %bugs;

sub next_bug {
  local $_ = shift;
  my $id;
  ($id) = ($_ =~ /show_bug.cgi\?id=(\d+)\"/m);
  $bugs{$id} = $_;
}

sub print_bugs {
  foreach (sort {$a <=> $b} keys %bugs) {
    print $bugs{$_};
  }
}


while (<>) {
  if (m{</table>}) {
    print_bugs;
    print $_;
    last;
  }
  if (m{</tr>}) {
    next_bug $bug_entry . $_;
    $bug_entry = '';
  }
  else {
    $bug_entry .= $_;
  }
}

while (<>) {
  print $_;
}


More information about the fedora-legacy-list mailing list