HOWTO: Parse Recent Twiki Edits in Python
To make up for my snarkiness in my last post . . . it is an easy matter of fetching the WebRss node from Twiki and running it through the Universal Feed Parser:
# Twiki RSS Feed
twiki_rss_url='http://localhost/twiki/bin/view/Main/WebRss'
import feedparser
import time
import calendar
# http://www.feedparser.org/
d = feedparser.parse(twiki_rss_url)
for e in d['entries']:
# e.updated_parsed = tuple UTC
# calendar.timegm = seconds UTC
# time.localtime = tuple locale
print time.strftime("%Y-%m-%d %H:%M",
time.localtime(calendar.timegm(e.updated_parsed)))
print e.rdf_value # Author
print e.title
print
Response
Mike B.
Ugh! Single character variable names in python! Bad!
Comment
Tiny Print:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>