script, refactor: rename authors to owners where relevant

This commit is contained in:
Jon Atack committed 2026-11-09 13:22:49 -06:00
1 parent d853786cd8
commit 7bf26a7109
1 file changed
+8 -8
+8 -8
View File
@@ -137,7 +137,7 @@ while (++$bipnum <= $topbip) {
} }
} }
my %found; my %found;
my ($title, $authors, $status, $version, $type, $layer); my ($title, $owners, $status, $version, $type, $layer);
my ($field, $val, @field_order, $continuation); my ($field, $val, @field_order, $continuation);
while (<$F>) { while (<$F>) {
last if ($is_markdown && m[^```$]); last if ($is_markdown && m[^```$]);
@@ -169,20 +169,20 @@ while (++$bipnum <= $topbip) {
my ($authorname, $authoremail) = ($1, $2); my ($authorname, $authoremail) = ($1, $2);
$authoremail =~ s/(?<=\D)$bipnum(?=\D)/<BIPNUM>/g; $authoremail =~ s/(?<=\D)$bipnum(?=\D)/<BIPNUM>/g;
$emails{$authorname}->{$authoremail} = undef; $emails{$authorname}->{$authoremail} = undef;
if (defined $authors) { if (defined $owners) {
$authors .= ", $authorname"; $owners .= ", $authorname";
} else { } else {
$authors = $authorname; $owners = $authorname;
} }
} elsif ($field eq 'Deputies') { } elsif ($field eq 'Deputies') {
$val =~ m/^(\S[^<@>]*\S) \<([^@>]*\@[\w.-]+\.\w+)\>$/ or die "Malformed Deputies line in $fn"; $val =~ m/^(\S[^<@>]*\S) \<([^@>]*\@[\w.-]+\.\w+)\>$/ or die "Malformed Deputies line in $fn";
my ($deputyname, $deputyemail) = ($1, $2); my ($deputyname, $deputyemail) = ($1, $2);
$deputyemail =~ s/(?<=\D)$bipnum(?=\D)/<BIPNUM>/g; $deputyemail =~ s/(?<=\D)$bipnum(?=\D)/<BIPNUM>/g;
$emails{$deputyname}->{$deputyemail} = undef; $emails{$deputyname}->{$deputyemail} = undef;
if (defined $authors) { if (defined $owners) {
$authors .= ", $deputyname"; $owners .= ", $deputyname";
} else { } else {
$authors = $deputyname; $owners = $deputyname;
} }
} elsif ($field eq 'Status') { } elsif ($field eq 'Status') {
if ($bipnum == 38) { # HACK if ($bipnum == 38) { # HACK
@@ -255,7 +255,7 @@ while (++$bipnum <= $topbip) {
} }
} }
print "| ${title}\n"; print "| ${title}\n";
print "| ${authors}\n"; print "| ${owners}\n";
print "| ${type}\n"; print "| ${type}\n";
print "| ${status}\n"; print "| ${status}\n";
close $F; close $F;