--- CVSROOT/cvs2rss.pl 2005/10/25 14:09:48 1.11 +++ CVSROOT/cvs2rss.pl 2008/11/26 18:43:30 1.13 @@ -21,20 +21,19 @@ # Edit by Guy Albertelli, -- corrected the packaging of Entities # - commits now
ed # - removed html rants -# +# Edit by Stuart Raeburn, -- eliminated earlier HTML::Entities customization. use strict; -use HTML::Entities(); use XML::RSS; use POSIX; # Stuff you need to setup -my $cvslink = 'http://install.loncapa.org/cgi-bin/cvsweb.cgi/'; -my $rssFeed ="/home/loninst/public_html/loncapa.rss"; +my $cvslink = 'http://source.loncapa.org/cgi-bin/cvsweb.cgi/'; +my $rssFeed ="/home/rss/cvs.rss"; my $emailDomain = "loncapa.org"; my $channelTitle = "Lon-CAPA RSS Feed"; -my $channelLink = "http://install.loncapa.org/loncapa.rss"; -my $numEntries = 200; +my $channelLink = "http://source.loncapa.org/rss/cvs.rss"; +my $numEntries = 30; # Set this to 1 to enable cvs rdiff my $cvsDiff = 1; @@ -75,9 +74,8 @@ my $commit_msg; while () { chomp($_); if ($_=~/^[A-Z].*:\s*$/) { - $_ = "
" . &HTML::Entities::encode($_,'<>&"') . "
"; + $_ = "
" .$_."
"; } else { - $_ = &HTML::Entities::encode($_,'<>&"'); $_ .= "
"; } $commit_msg .= $_; @@ -103,7 +101,9 @@ foreach my $file (@args) { # This will rdiff it against the previous version, and # include that diff in the rss feed - if (($title[1] != "NONE") && ($title[0]=~/(.*).(pm|pl|conf|tab)$/)){ + if (($title[1] != "NONE") + && ($title[0]=~/(.*)\.(pm|pl|conf|tab)$/) + && ($title[0]!~{/localize/localize/..\.pm}) ) { my $tmpFile = "/tmp/diff.$$"; my $cmdLine = "cvs -n rdiff -u -kk -r " . $title[1] . " -r " . $title[2] . " " . $title[0] . ">" . $tmpFile; system($cmdLine); @@ -111,7 +111,7 @@ foreach my $file (@args) { $description .= "
Differences:"; open CVSDIFF, "<" . $tmpFile; foreach my $line ("; unlink($tmpFile); @@ -133,11 +133,6 @@ foreach my $file (@args) { ); } -foreach my $element (@{$rss->{'items'}}) { - $element->{'description'} = - &HTML::Entities::encode($element->{'description'},'<>&"'); -} - $rss->save($rssFeed); # Rsync this rss feed to another publically accessable machine.) { - $description .= &HTML::Entities::encode($line,'<>&"'); + $description .= $line; } $description .= "