head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 2005.06.11.19.12.54; author rse; state Exp; branches; next 1.2; 1.2 date 2003.02.20.10.14.02; author rse; state Exp; branches; next 1.1; 1.1 date 2003.02.20.08.34.26; author rse; state Exp; branches; next ; desc @@ 1.3 log @flish pending changes @ text @#!/v/openpkg/sw/bin/perl ## ## security.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 Security Advisories\n" . " http://www.openpkg.org/\n" . " OpenPKG Security Advisories\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 =~ m|S<(OpenPKG-SA-([^>]+))>|) { $link = "http://www.openpkg.org/security/$1.html"; $text = "$2"; } $refs .= " \n"; $items .= "\n" . " $text\n" . " $link\n" . "\n"; } $rdf .= "\n" . " \n" . $refs . " \n" . "\n"; $rdf .= $items; $rdf .= "\n"; open(FP, ">security.rdf"); print FP $rdf; close(FP); @ 1.2 log @reduce size of entries @ text @d1 1 a1 1 #!/e/openpkg/sw/bin/perl @ 1.1 log @provide security advisories also in RDF/RSS format @ text @d36 1 a36 1 if ($text =~ s|S<([^>]+)>|$1|s) { d38 1 a39 1 $text =~ s|S<([^>]+)>|$1|sg; @