rss2email

read newsfeeds from your email client

rss2email is a simple Python script that lets you subscribe to a list of XML newsfeeds (RSS or Atom) and get new items sent to you by email.

Screenshot

To: me@aaronsw.com
From: World Wide Web Consortium <rssfeed@aaronsw.com>
Subject: CC/PP Structure and Vocabularies 1.0 Is a W3C Recommendation

2004-01-15: The World Wide Web Consortium today released Composite 
Capability/Preference Profiles (CC/PP): Structure and Vocabularies 1.0 as a 
W3C Recommendation. CC/PP 1.0 is a system for expressing device capabilities 
and user preferences using the Resource Description Framework (RDF). CC/PP 
guides the adaptation of content, making it easier to deliver Web content to 
devices. Read the press release and testimonials, and visit the Device 
Independence home page. (News archive)

URL: http://www.w3.org/News/2002#item149

Install

Debian package rss2email (Joey Hess)
NetBSD/pkgsrc package rss2email (Amitai Schlair)

Otherwise, the following instructions are for UNIX:

mkdir .rss2email
cd .rss2email
wget http://www.aaronsw.com/2002/rss2email/rss2email.py
wget http://www.aaronsw.com/2002/html2text/html2text.py 
wget http://feedparser.org/feedparser.py
wget http://www.aaronsw.com/2002/rss2email/r2e
chmod +x r2e

Configure

Create a new feed database:

./r2e new you@yourdomain.com

Subscribe to some feeds:

./r2e add http://www.aaronsw.com/2002/rss2email/updates.rss

(That's the feed to be notified when there's a new version of rss2email.) Repeat this for each feed you want to subscribe to.

Upgrade

If you're upgrading from 1.0, you can import your old channels.txt by running:

awk '{print $2}' < channels.txt | xargs -n 1 ./r2e add

When you run rss2email, it emails you about every story it hasn't seen before. But the first time you run it, that will be every story. To avoid this, you can ask rss2email not to send you any stories the first time you run it:

./r2e run --no-send

Then later, you can ask it to email you new stories:

./r2e run

You probably want to set things up so that this command is run repeatedly. (One good way is via a cron job.)

Customize

There are a few options, described at the top of rss2email.py. If you want to change something, add it to config.py. For example, if you want to receive HTML mail, instead of having entries converted to plain text:

echo "HTML_MAIL = 1" >> config.py

To be notified every time a post changes, instead of just when it's first posted:

echo "TRUST_GUID = 0" >> config.py

And to make the emails look as if they were sent when the item was posted:

echo "DATE_HEADER = 1" >> config.py

History

RSS feed for program updates.

2005-08-03: 2.55. datetime parsing bug
2004-08-27: 2.54. more errors.
2004-08-26: 2.53. typo errors.
2004-08-26: 2.52. support html descriptions (tx Peter Vangorp), bonus header, override from, python2.1 support, unicode headers (tx Lars Wirzenius), remove extra comma, better error reporting.
2004-07-06: 2.511. Typo bug with emails. Tx daniel.
2004-06-28: 2.51. Fix crash on 2.1, 2.2 feed timeout.
2004-06-25: 2.5. HTML mail, SMTP, feedparser 3.0, and html2text 2.0 support.
2004-03-08: 2.32. Fix crash on empty feed list.
2004-02-16: 2.31. Fix FORCE_FROM handling.
2004-02-11: 2.3. Far more robust. Fix for Unicode crash. Use guid instead of link for seen frame. (Warning: resends!)
2004-02-02: 2.28. --no-send option for run, fixed FORCE_FROM. Tx Alan D.
2004-02-01: 2.27. DATE_HEADER option, better error reporting, `r2e list` doesn't lock, fix for no-download crash. Tx Alan D.
2004-01-30: 2.26. Fix for typo, email replacement. Added VERBOSE, FORCE_FROM options and redirect support. Tx Alan D., Pete Prodoehi, Matej.
2004-01-30: 2.25. Quote email address names. Tx Alan Danziger, qmail.
2004-01-30: 2.24. Possible fix for process leak. Tx Alan Danziger.
2004-01-30: 2.23. Fix for empty link tags.
2004-01-29: 2.22. Fix for config file bug.
2004-01-29: 2.21. Pls upgrade. Added QP support, fix for empty GUIDs, and fix for major default email bugs.
2004-01-29: 2.2. Added default email support, backwards-compatible. Tx Matej Cepl.
2004-01-28: 2.1. Minor bugs, config file support, email tweaks. Patch by Joey Hess.
2004-01-28: 2.0. Mostly rewritten.

Aaron Swartz (rss2email@aaronsw.com)