/[pub]/suikawiki/script/bin/referer2to3.pl
Suika

Diff of /suikawiki/script/bin/referer2to3.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Thu Mar 11 04:04:06 2004 UTC revision 1.2 by wakaba, Thu Mar 11 08:06:26 2004 UTC
# Line 38  $source =~ s!^\#\?SuikaWikiMetaInfo/0.9[ Line 38  $source =~ s!^\#\?SuikaWikiMetaInfo/0.9[
38  my $i = 0;  my $i = 0;
39  for my $old (map {[split /\x1F/, $_, 2]} split /\x1E/, $source) {  for my $old (map {[split /\x1F/, $_, 2]} split /\x1E/, $source) {
40    my $page = [split m#//#, $old->[0]];    my $page = [split m#//#, $old->[0]];
41    my %referer = map {split /\x09/, 2} split "\x0A", $out->get ('referer', $page);    my %referer = map {split /\x09/, 2} split /\x0A/, $out->get ('referer', $page);
42    my %newref = split /"/, $old->[1];    my %newref = split /"/, $old->[1];
43    for (keys %newref) {    for (grep {$_} keys %newref) {
44      $referer{$_} += $newref{$_};      $referer{$_} += $newref{$_} if $_ and $newref{$_};
45    }    }
46    $out->set ('referer', $page    $out->set ('referer', $page
47               => join "\x0A", map {$_ . "\x09" . $referer{$_}} keys %referer);               => join "\x0A", map {$_ . "\x09" . $referer{$_}} keys %referer);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24