Transfer all the google feed URLs to rss2email.

Next step in restoring my settings was to get the working rules and all the blogs into rss2email. I have subscribed to more than 150 blogs. So, adding all of them manually was difficult.

For a time like this, I subscribe to all the blogs using google reader and then add them to rss2email. So I had quickly exported the google feeds list and then had to find a way to extract the URLs for the blog to the rss2email. The command to add a url is r2e add, so I wrote this one line just now to do the task for me.

Hope it helps someone:

for i in $(cat google-reader-subscriptions.xml |grep xmlUrl|sed -e \’s@.*xmlUrl=\”\\(.*\\) .*@\\1@\’|sed -e \’s/\”//\’); do r2e add $i; done

Now all I needed to do was to setup procmail again to deliver the messages to my homedir. I already have posted article on procmailrc so that was simple. So all done. Hope this helps someone.

Simple rss to email service for your feeds on Linux with your/ISP server.

I like couple of blogs and feeds but the problem is that I keep forgetting to run the rss reader and would rather like to have the rss article\’s emailed to me at regular intervals so that I can read them when I want to without having to make sure that I am at my desktop at home computer or remembering to start the rss client. That sounds simple and do-able so lets try to do that.

First off, there is a rss2email application that you would need to install. If you are on fedora, just do

sudo yum install rss2email

Once that is done, just edit the ~/.rss2email/ to specify if you would like to use the sendmail of your system or to use the SMTP server to send the mail.  Here is the config file, how it looks on my system



Now we will configure the feeds that we need to receive the email for. So first add the default email address for the program:

r2e email emailaddress

Now is the turn to add the feeds. You can add the feed using the command:

r2e add <URL>

Once that is done, you are ready to go. Just put \”r2e run\” in cron and you start getting the mail without ever forgetting to read the feed or starting the feed client.

But if you have say like 50 odd feeds, then adding then one by one is 🙁

AWK to our rescue here. Take the opml file from your feedreader or bloglines or any other client, doesn\’t matter.

For simplicity sake, assume the file is named export.opml. Then run the following command on a terminal:

awk -F\’=\’ \'{
if ($3 ~ /xmlUrl/)
if ($4 ~ /xmlUrl/)
if ($5 ~ /xmlUrl/)
}\’ export.opml >ak

This will create a file called ak with the URL\’s in the file but contains the \” and some trailing characters, time to remove them and get a shell script that can add the URL\’s for us. AWK to rescue again:

awk -F\”\”\” \'{print \”r2e add \”$2}\’ ak >ak2

This will generate file called ak2, which you can chmod and run to add all the URL\’s to the rss2email program. You can check the handiwork with

r2e list

And if something goes wrong then you can just delete all the feeds, \”r2e list\” note the last number and do the following:

for i in `seq <number> -1 1`; do r2e delete $i; done