summaryrefslogtreecommitdiffstats
path: root/www/digest/rssify.pl
blob: ba6fca7d8b06c487be1d86a74211c73662129bfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl

my $fill = "RRREEEPPP";

my $end++;

while(<STDIN>) {
    my $line = $_;

#    $line =~ s/ZAGOR/Bjrn Stenberg/g;

    $line =~ s//\&Ouml;/g;
    $line =~ s//\&ouml;/g;
    $line =~ s/</\&lt;/g;
    $line =~ s/>/\&gt;/g;

    if($line =~ s/(LINK\((\"([^\"]*)\"))/$fill/) {
        my $url = $2;
        $url =~ s/@/\#%40;/g;
        $url =~ s/=/\#%3D;/g;
        $url =~ s/&/\&amp;/g;
        $line =~ s/$fill/LINK\($url/;
    }
    print $line;

    if($line =~ /^ *ENDDATE/) {
        if($end++ == 15) {
            last;
        }

    }
}