head 1.6; access; symbols; locks; strict; comment @# @; 1.6 date 2005.02.14.11.04.35; author rse; state Exp; branches; next 1.5; 1.5 date 2003.02.23.12.17.44; author rse; state Exp; branches; next 1.4; 1.4 date 2002.12.19.10.52.43; author rse; state Exp; branches; next 1.3; 1.3 date 2002.01.20.10.29.27; author rse; state Exp; branches; next 1.2; 1.2 date 2001.10.24.14.40.09; author rse; state Exp; branches; next 1.1; 1.1 date 2001.10.17.12.25.11; author rse; state Exp; branches; next ; desc @@ 1.6 log @fix paths @ text @#!/v/openpkg/sw/bin/perl ## ## news.rdf.mk -- Generate news.rdf in XML/RDF/RSS 1.0 format ## See http://www.purl.org/rss/ for details about RSS 1.0. ## my $txt = ''; open(FP, "); $txt =~ s|^(([^\n]+\n){15}).*$|$1|s; close(FP); my $rdf = ''; $rdf .= "\n" . "\n"; $rdf .= "\n" . " OpenPKG Newsflash\n" . " http://www.openpkg.org/\n" . " OpenPKG Latest News\n" . "\n"; my $refs = ''; my $items = ''; $txt =~ s|^(.+):\s+(.+)$|&do1($1, $2), ''|mge; sub do1 { my ($date, $entry) = @@_; my ($link, $text); $text = $entry; $link = "http://www.openpkg.org/"; if ($text =~ s|P<([^>]+)>|$1|s) { $link = "ftp://ftp.openpkg.org/current/SRC/$1.src.rpm"; } $text =~ s|P<([^>]+)>|$1|sg; $text =~ s|B<([^>]+)>|$1|sg; $text =~ s|I<([^>]+)>|$1|sg; $refs .= " \n"; $items .= "\n" . " $text\n" . " $link\n" . "\n"; } $rdf .= "\n" . " \n" . $refs . " \n" . "\n"; $rdf .= $items; $rdf .= "\n"; open(FP, ">news.rdf"); print FP $rdf; close(FP); @ 1.5 log @flush pending changes @ text @d1 1 a1 1 #!/e/openpkg/sw/bin/perl @ 1.4 log @commit pending changes to CVS @ text @d1 1 a1 1 #!/usr/bin/perl @ 1.3 log @fix URLs and provide only first 10 entries @ text @d10 1 a10 1 $txt =~ s|^(([^\n]+\n){10}).*$|$1|s; @ 1.2 log @update RDF to RSS 1.0 format @ text @d10 1 d37 1 a37 1 $link = "http://www.openpkg.org/pkg.cgi?package=$1"; @ 1.1 log @add script for generating news.rdf @ text @d2 4 d16 1 a16 1 " xmlns=\"http://my.netscape.com/rdf/simple/0.9/\"\n" . d19 1 a19 1 $rdf .= "\n" . d25 2 d41 5 a45 4 $rdf .= "\n" . " $text\n" . " $link\n" . "\n"; d47 8 @