[Libreoffice-commits] dev-tools.git: scripts/Bugzilla.pm
Michael Meeks
michael.meeks at collabora.com
Tue Sep 16 09:33:28 PDT 2014
scripts/Bugzilla.pm | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 555f3472b3f08e7492fe85cc78e0ae7b062b7ebc
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Sep 16 17:36:52 2014 +0100
Update for page structure.
diff --git a/scripts/Bugzilla.pm b/scripts/Bugzilla.pm
index 31030d2..ecd71a3 100644
--- a/scripts/Bugzilla.pm
+++ b/scripts/Bugzilla.pm
@@ -61,6 +61,9 @@ my %sadly_non_libreoffice = (
'Tapani Pälli' => 1,
'Matt Turner' => 1,
'Michel Dänzer' => 1,
+ 'Jani Nikula' => 1,
+ 'Guo Jinxian' => 1,
+ 'Pekka Paalanen' => 1,
);
sub get_url($)
@@ -149,13 +152,15 @@ sub read_bugstats($)
{
my @lines = get_url(shift);
+ my $debug = 0;
+
my $region = 'header';
my $closer_name;
my %closed_stats;
my $delta = 0;
while ((my $line = shift @lines) && $region ne 'end') {
-# print STDERR "$region -> $line\n";
+ print STDERR "$region -> $line\n" if ($debug);
if ($region eq 'header' && $line =~ /<h2>Top .* modules<\/h2>/) {
$region = 'top-modules';
@@ -178,17 +183,19 @@ sub read_bugstats($)
undef $closer_name;
$region = 'top-closer-name';
- } elsif ($region eq 'top-closers' && $line =~ m/<\/table>/) {
+ } elsif (($region eq 'top-closers' || $region eq 'top-closer-name') &&
+ ($line =~ m/<\/table>/ || $line =~ m/Top .* bug reporters/)) {
$region = 'end';
} elsif ($region eq 'top-closer-name' && $line =~ m/<span class=".*">(.*)<\/span>/) {
$closer_name = $1;
-# print "$closer_name\n";
+ print STDERR "$closer_name\n" if ($debug);
$region = 'top-closer-count';
} elsif ($region eq 'top-closer-count' && $line =~ m/">([0-9]+)<\/a><\/td>/) {
die "no closer name for '$line'" if (!defined $closer_name);
$closed_stats{$closer_name} = $1;
+ print STDERR "\tRecord: $closer_name -> $1\n" if ($debug);
$region = 'top-closers'
}
}
More information about the Libreoffice-commits
mailing list