The Artima Developer Community
Sponsored Link

Python Buzz Forum
Outlined Blogroll

0 replies.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a flat view of this topic  Flat View
Previous Topic   Next Topic
Threaded View: This topic has 0 replies on 1 page
Rand Anderson

Posts: 38
Nickname: randog
Registered: Mar, 2004

Rand Anderson is a modeler who hacks in python
Outlined Blogroll Posted: Mar 23, 2004 7:29 PM
Reply to this message Reply

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


    Topic: PyCon sprints, day 2, dinner Previous Topic   Next Topic Topic: PyCon sprints, day 2

    Sponsored Links



    Google
      Web Artima.com   

    Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use