<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
#use strict;
#use diagnostics;

require XML::RSS;

my @sites = ();
push(@sites, "http://linuxdot.nl.linux.org/linuxdot.php");

my @news = ();

my $rss = new XML::RSS;
foreach my $site (@sites) {
  my $rdfstring = `lynx -source $site`;
  if ($rdfstring) {
    $rss-&gt;parse($rdfstring);
    my $time = `date +"%e %B %Y - %k:%M"`;
    push (@news, "&lt;b&gt;&lt;a href=\"$rss-&gt;{channel}-&gt;{'link'}\"&gt;$rss-&gt;{channel}-&gt;{title}&lt;/a&gt;&lt;/b&gt; &lt;i&gt;$time&lt;/i&gt;\n");
    push (@news, "&lt;ul&gt;\n");
    foreach my $item (@{$rss-&gt;{'items'}}) {
        push (@news, "&lt;a href=\"$item-&gt;{'link'}\"&gt;$item-&gt;{'title'}&lt;/a&gt;&lt;br&gt;\n");
    }
    push (@news, "&lt;/ul&gt;\n");
  }
}

open (OUTPUT, "&gt;../../News/index.html");
open (TEMPLATE, "template.html");
my $line = "";
while ($line = &lt;TEMPLATE&gt;) {
    if ($line =~ /macro\ insert\ news/) {
	print OUTPUT @news;
    }
    print OUTPUT $line;
}
close (TEMPLATE);

1;






</pre></body></html>