|
This post originated from an RSS feed registered with Python Buzz
by Rand Anderson.
|
Original Post: Outlined Blogroll
Feed Title: Python Postings
Feed URL: http://www.executableabstractions.com/weblog/Python/rss.xml
Feed Description: On my explorations of python
|
Latest Python Buzz Posts
Latest Python Buzz Posts by Rand Anderson
Latest Posts From Python Postings
|
|
Putting aside for the moment the issues of whether and how to organize a blogroll beyond a simple list (these issues to be covered in a follow-up post), here is a decent first cut at presenting such information in an expandable/collapsable form, assuming you have some such blogroll feed taxonomy available in OPML.
With the help of the recent activeRenderer v2.0 and its new XML-RPC API, I've finally managed to add my blogroll to my page's sidebar in a form that I feel is at least a slight improvement over the flat list. ActiveRenderer does all the hard work.
Here's the python code:
def blogrollRenderer(self, blogrollURL='c:\\somefiles\\mySubscriptions.opml'):
import xmlrpclib
server = xmlrpclib.Server("http://rpc.activerenderer.com")
opmlFile = open(blogrollURL)
opml = opmlFile.read()
opmlFile.close()
opmlHtml = server.activeRenderer.opmlRenderer(opml)
html = '<p>'
html += '<b>Blogroll</b>'
html += '<link rel="stylesheet" type="text/css"
href="http://www.activerenderer.com/activeRenderer/activerenderer.css">'
html += '<script type="text/javascript"
src="http://www.activerenderer.com/activeRenderer/activerenderer.js"></script>'
html += opmlHtml
html += '</p>'
return html
With PyDS, you just put this in a macro, and then invoke the macro from a nugget, and you're done.
Of course this is just step one; some usability issues still need to be addressed, foremost being easier access to the sites and RSS URLs of the listed feeds. This looks like it will require delving a bit into the activeRenderer script.
TTD (Things To Do):
Bag inline expansion of items
Add hrefs to feed items
Add rss links to feed items
Replace use of remote activerenderer resources with local copies where possible
Read: Outlined Blogroll