# Reading newsfeeds.

from nodebox_web import web
from nodebox_web.web import newsfeed

url = "http://rss.slashdot.org/Slashdot/slashdot"

# Parse the newsfeed data into a handy object.
feed = newsfeed.parse(url)

# Get the title and the description of the feed.
print feed.title, "|", feed.description

for item in feed.items:
    print "-" * 40
    print "- Title       :", item.title
    print "- Link        :", item.link
    print "- Description :", web.html.plain(item.description)
    print "- Date        :", item.date
    print "- Author      :", item.author

print item.description
