Quick Changes As Rss

See RecentChangesRss.


Both lists on this page work in MozillaFirefox but not in MicrosoftInternetExplorer (IE), only available standard at workplace. Maybe the missing in first line is the culprit?


Here's a simple RubyLanguage script that I use to grab QuickChanges in RSS (RichSiteSummary) format.

Why could this be useful? Well, I'm running KDE -- the K Desktop Environment -- which contains KNewsTicker, a so-called panel applet that displays a scrolling list of news headlines from various sources. These sources supply their data in RSS format and with this script the Wiki is one of them.

-- MichaelSchuerig


#! /usr/bin/ruby
require 'net/http'
@pat = %r{(.*?)}
@server = 'c2.com'
@quickChanges = '/cgi/quickChanges?days=1'
@linkbase = 'http://' + @server + '/cgi/wiki?'
def main()
begin
h = Net::HTTP.new(@server)
resp, data = h.get(@quickChanges, nil)
print_header()
print_entries(data)
print_footer()
rescue Exception
exit(1)
end
end
def print_entries(changes)
changes.grep(@pat) { |p|
print "#{$2}"
print "#{@linkbase}#{$1}
\n"
}
end
def print_header()
print < "http://my.netscape.com/publish/formats/rss-0.91.dtd">


Wiki Quick Changes
en
http://c2.com/cgi/quickChanges
WikiWikiWeb Quick Changes
EOS
end
def print_footer()
print <

EOS
end
main()

CategoryRss