forked from dogriffiths/rssgossip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
21 lines (13 loc) · 882 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
RSS GOSSIP
==========
This is a very, very simple Python module to read the contents of an RSS feed and look for a key phrase.
For example, to look for stories about 'Snooki' in the MSN Entertainment feed, you can do this:
export RSS_FEED=http://www.msn.com/rss/MsnEntertainment.aspx
./rssgossip.py 'Snooki'
Why does the script configure the feed using an environment variable? Because this module was written as
an example program for the book Head First C (http://shop.oreilly.com/product/0636920015482.do). The book
needed an example external program that required command line arguments as well as environment variables.
If you want the script to search more than one feed, set RSS_FEED a list of space-separated URLs.
The search string can be a regular expression. So:
./rssgossip.py 'lohan|britney|kardashian'
will find stories containing any of the three names.