/[swish]/trunk/spider/filter.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/spider/filter.pm

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

revision 84 by dpavlin, Wed Apr 7 12:54:21 2004 UTC revision 85 by dpavlin, Mon Aug 30 11:14:24 2004 UTC
# Line 48  sub filter { Line 48  sub filter {
48                  }                  }
49                  $contents =~ s,(<title>)([^<]+)(</title>),$1$2: $title$3,gsi if ($title);                  $contents =~ s,(<title>)([^<]+)(</title>),$1$2: $title$3,gsi if ($title);
50    
51            } elsif ($contents =~ m,<!--\s+METADATA(.*?)METADATA\s+-->,is) {
52                    # LJ metadata
53                    my $metadata = $1;
54                    my $title = "LJ";
55    
56                    $title .= "$1: " if ($metadata =~ m,<issue>(.+?)</issue>,is);
57                    $title .= "$1 - " if ($metadata =~ m,<category>(.+?)</category>,is);
58                    $title .= $1 if ($metadata =~ m,<title>(.+?)</title>,is);
59                    $title =~ s/\s+/ /gsi;
60                    $contents =~ s,<title>[^<]+</title>,<title>$title</title>,is;
61          }          }
62    
63          # is second argument collection?          # is second argument collection?

Legend:
Removed from v.84  
changed lines
  Added in v.85

  ViewVC Help
Powered by ViewVC 1.1.26