Update this script so it works correctly with the current format of

http://www.netbsd.org/People/port-maintainers.html .

Also, clarify some comments, escape a backlash so that the correct
macro for ø is generated, and make sure it's substituted everywhere
in the name.

This script is still not perfect - it will produce incorrect output
the first time that the second portmaster has a hyperlink associated
with his name.  For now, though, it generates correct output for
what we've got.
This commit is contained in:
riz 2005-08-22 06:29:53 +00:00
parent 7cd3fcaa97
commit ff57609c26
1 changed files with 11 additions and 11 deletions

View File

@ -34,10 +34,11 @@
# 1) lynx -dump http://www.netbsd.org/People/port-maintainers.html \
# | perl list-portmasters.pl
# >x
# 2) Last entry will need fixing (BUG)
# 3) Sort: sort +1 x >xx ; mv xx x
# 4) merge "x" into src/distrib/notes/common/main's "portmasters" section
# 2) Sort: sort +1 x >xx ; mv xx x
# 3) merge "x" into src/distrib/notes/common/main's "portmasters" section
#
# Note: If the *second* portmaster of a port has a link as part of the
# Name field, it will cause this script to error out.
while(<>) {
chomp;
@ -54,15 +55,12 @@ while(<>) {
$email=pop(@a);
$name="@a";
if ($port !~ /\[\d+\]/) {
# fixup needed *sigh*
$last_name .= " $last_email";
$last_email = $email;
if ($port && $port !~ /\[\d+\]/) {
# Port name is wrong - probably because of dual portmasters.
# Fix it up.
$name = "$port $name";
$port = $last_port;
$email = <>;
chomp($email);
}
# valid data is now in $last_*,
@ -71,8 +69,10 @@ while(<>) {
$last_port=~s,\s*\[\d+\],,;
$last_name=~s,\s*\[\d+\],,;
$last_email=~s,\s*\[\d+\],,;
$last_email=~s,\<,,;
$last_email=~s,\>,,;
$last_name=~s,ø,\(/o,; # Søren => S\(/oren
$last_name=~s,ø,\\(/o,g; # Søren => S\(/oren
# output
print ".It ";