--- db/prgsrc/makeauthors.pl 2003/01/08 21:40:21 1.2 +++ db/prgsrc/makeauthors.pl 2005/11/29 19:46:26 1.6 @@ -1,5 +1,4 @@ - -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w =head1 NAME @@ -24,14 +23,16 @@ makeauthors.pl use dbchgk; +my $DUMPDIR = $ENV{DUMPDIR} || "../dump"; + do "chgk.cnf"; use locale; use POSIX qw (locale_h); open NICKS, "<$nicksfile" or die "Can not open nicks"; open SSNICKS, "<$ssnicksfile" or die "Can not open ssnicks"; -open UNKNOWN, ">uauthors"; -open UNICKS, ">unicks"; -open STDERR, ">errors"; +open UNKNOWN, ">$DUMPDIR/uauthors"; +open UNICKS, ">$DUMPDIR/unicks"; +open STDERR, ">$DUMPDIR/errors"; my ($thislocale); if ($^O =~ /win/i) { $thislocale = "Russian_Russia.20866"; @@ -75,6 +76,7 @@ while () $name{$nick}= ucfirst lc $name; $surname=ucfirst lc $surname; $surname=~s/\-(.)/"-". uc $1/ge; + $surname=~s/\'(.)/"'". uc $1/ge; $surname{$nick}= $surname; } @@ -151,7 +153,7 @@ while (($QuestionId, $author)=getrow,$Qu $author=~s/\s+$//mg; $author=~s/\s+/ /mg; $author=uc $author; - + $author=~s/£/Å/mg; if ($nick = $nick{$author}) { my @a=split ' ',$nick;