for those of you who would rather listen than read

The analogy that "reading blogs is like god listening to all the prayers before bed," I mostly agree with except for the listening part. To be more specifically accurate, up until now god must have been using some type of agreegator to read all the blogs. And since frankly not everyone out there likes reading, why not expand the audience and invite some of the non-readers to participate. So I wrote a little python script that can be used to listen to blogs. Think of it as podcasts for those of you on skimpy data plans that don't allow for downloading of multimedia content.

#!/usr/bin/env python

import os
import feedparser


feeds2Read = ['http://cypod.blogspot.com/rss.xml']

for feed in feeds2Read:
d = feedparser.parse(feed)
entry = 5
if len(d['entries']) < entry: entry = len(d['entries'])
for i in xrange(0,entry):
os.system('espeak "%s"' % d['entries'][i]['title'])
e = d.entries[i]
content = e.content
os.system('espeak "%s"' % content)



espeak is an open source speach synthesizer, the script uses it to handle the text to speach stuff. Feedparser handles all the html grepping, it's a little messy with some formating getting into the stream if there is some interests maybe some of you uberneird readers can post a one up in the comments

No comments: