rss2email is a small Python utility that sends out nicely formatted emails from RSS feed postings. Why would you want such a thing? Well, many people still use email as their primary communications tool and don’t want to be bothered with RSS. Also, if you are on the go and are using a mobile device, it is often easier to be buzzed by push email than it is to configure a mobile RSS reader.
We have a help desk system (HelpSpot) that provides an RSS feed from the help desk system’s forums. We’ve configured an internal forum that IT department staff use to let other members know when they are going to be out of the office, etc. The forum system requires a log-in.
Here’s the recipe for configuring rss2email on a Centos 5.x box:
- Download rss2email:
- Untar the file:
tar xvfz rss2email-2.66.tar.gz
- Create a symbolic link to the versioned directory:
ln -s rss2email-2.66 r2e
- Change into the directory:
- Once you’re in the r2e directory, you’re ready to configure the software.
- Make the script executable:
chmod +x ./r2e
- Configure an email address that will receive the RSS feeds:
./r2e new EMAILADDR@YOURSERVER.COM
- Add a feed URL:
./r2e add http://www.law.emory.edu/index.php?id=470&type=100
- This would work fine if the feed is public as in the above example.
- If your feed requires a username and password, you need to enter the URL like this:
- Here’s an additional gotcha – if the USERNAME part is itself an email address, then you’ll need to enter the USERNAME like so: USER%40DOMAIN.COM. In other words, you will need to URL encode the @ sign, as the @ sign is being used in another sense above – it’s the separator between the username:password and the name of the site providing the RSS feed. Encode the first @ sign; do not encode the second one. The complete command will then look like:
./r2e add http://USERNAME%40DOMAIN.COM:PASSWORD@feedserverurl.com
- Each time you do
./r2e add RSSURL, it will add a new entry to the list of URLs that will be checked for RSS feeds. To see the list of feeds, do
./r2e list. You’ll get back a list of feeds to which the program is subscribed. Each feed will have a number beside it. To delete a feed, do
./r2e delete FEEDNUMBER. Once the feed is deleted, you’ll receive a warning that the feed numbering has changed. Do ‘
./r2e list‘ again to see the current feed numbering.
- Once you’re satisfied that you have properly configured your feeds, you will want to automate the service. Here’s one way to do that:
- Edit your crontab file:
- Add the following line to run r2e every five minutes:
*/5 * * * * (cd /DIRECTORYWITHCODE/r2e;/DIRECTORYWITHCODE/r2e/r2e -run)
- Edit your crontab file: