simple news ticker for mac desktop
just written a nice little script to update my desktop with news from the bbc rss feed -- it requires the feedparser.py module, and geektool to get it to display every N seconds on the desktop. here's the code:
import feedparser
import urllib2
from os import *
from sys import *
from random import choice
proxy = your proxy path
proxy_support = urllib2.ProxyHandler({"http" :proxy})
d = feedparser.parse('http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml',
handlers=[proxy_support])
ff = stdout
C = choice(d['entries'])
news= C['summary']
date = C['updated']
try:ff.write(news+' '+date)
except:ff.write('bummer!')
import feedparser
import urllib2
from os import *
from sys import *
from random import choice
proxy = your proxy path
proxy_support = urllib2.ProxyHandler({"http" :proxy})
d = feedparser.parse('http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml',
handlers=[proxy_support])
ff = stdout
C = choice(d['entries'])
news= C['summary']
date = C['updated']
try:ff.write(news+' '+date)
except:ff.write('bummer!')