# Mail.app RSS Feeds to OPML
I do like to use Mail.app in Mac OS X. I use it for emails and I use it for newsfeeds.
However, I have one particular problem with it, which is: It’s able to import RSS and Atom feeds, but cannot export a file which lists all of the RSS/Atom feeds that you have subscribed too. If this information was exported into the OPML format, then it would be able to be imported into many different feed readers (such as the superior OpenLink Data Space Feed Manager, or the Google Reader or the NetNewsWire)
Well. This afternoon I created something awesome, it’s quite a small Ruby program which creates an OPML file of your feeds which can then be uploaded to other feed readers. I call it MailAppToOPML.
It’s a Google Hosted project and is available through the MailAppToOPML Google Code Space.
Why Ruby?
It’s simple, it’s available on Leopard natively and I am quite fond of it’s blend of Object Oriented and Functional Programming styles.
Why would I want to export it from Mail.app?
You might find that having your RSS and Atom feeds in Mail.app is quite restrictive. For example if you imported the subscriptions into OpenLink Data Space Feed Manager then you would have the added benefit of your feeds being in a well established methodology known as Linked Data (for those techies out there, that means that you’ll be able to SPARQL your feeds!). You may also want to create a neat little widget (WUPnP) for your website which displays current items in your feeds, so that you can share a bit of your knowledge space (Universe of Discourse).
How to use it?
Simply download it from the MailAppToOPML Google Code Space, and then launch terminal. Run the file (mailapptoopml.rb) by dragging it onto terminal and pressing the enter key. It will then tell you where the outputted file is.
Shouldn’t be too much of a problem. Let me know if you encounter any errors though, I’ll be happy to fix ‘em.
July 16th, 2008 at 8:31 pm
The precise location of the file is available via the subversion browser provided by Google, and so can be founded precisely here: https://code.google.com/p/mailapptoopml/source/browse/trunk/mailapptoopml.rb
September 16th, 2008 at 11:46 pm
This was just what I needed to get my RSS feeds out of buggy Mail.app. Thanks!
November 14th, 2008 at 5:12 pm
Thanks for this program! A beautiful solution.
January 8th, 2009 at 7:29 am
[...] - bookmarked by 3 members originally found by paolog666 on 2008-12-07 Mail.app RSS Feeds to OPML https://www.vanirsystems.com/danielsblog/2008/07/16/mailapp-rss-feeds-to-opml/ - bookmarked by 3 [...]
January 9th, 2009 at 5:41 am
thanks so much!
January 30th, 2009 at 10:28 pm
It says “Permission denied” when I try to use it.
February 1st, 2009 at 2:55 pm
Hi,
I made some changes to the script that you might wanna check out. I thought I should let you know anyway.
It’s available here https://github.com/anderscarling/mailapptoopml/commit/87d38fd812794a3282018bca79c6d32bb57aff61
February 3rd, 2009 at 11:09 am
Exactly what I was looking for! However - I get a “Permission denied” when dragging the script to the terminal. Any idea? Thanks!
February 3rd, 2009 at 11:15 am
if you get “Permission denied”, you’ll have to type sudo before the command on the command line. So something like this:
sudo mailapptoopml.rb
February 3rd, 2009 at 11:48 am
Thanks for your fast reply! Now I´m getting “mailapptoopml.rb: command not found” - I´m very much a terminal-newbie, so maybe I´m missing some very basic stuff here…
February 3rd, 2009 at 11:51 am
ok, thats because you’re not providing a file path. To do that, type on the command line:
sudo
(including a space after it). Then drag the file on to the same terminal window. Then press enter.
It’ll ask you for your password.
That should work.
Once you get the program working, there is a small possibility that the program just won’t work. I am aware of some bugs, which I need to get around to ironing out. Let me know how it goes.
Daniel
February 3rd, 2009 at 11:59 am
Same thing: “sudo: /Users/XXX/mailapptoopml.rb: command not found” - hmm… I´m on 10.5.6 if it matters?
February 3rd, 2009 at 12:02 pm
Ah, yes. You’ll need at least 10.6 I believe… this is due to the requirement of the Ruby programming language.
Apologies.
Daniel
February 3rd, 2009 at 12:06 pm
That solves my confusion. Thanks for your help! Much appreciated.
March 30th, 2009 at 3:16 am
I’m running 10.5.6, and I got this to work. It just takes a bit of Terminal voodoo.
At the terminal, you need to type:
sudo ruby [full path to file]
This solves the permission denied/command not found issues.
May 30th, 2009 at 4:08 pm
This great solution does not work… When trying to upload in Google Reader is states does not compute, error.
Now what…. :/ Granted that I suck at Terminal use and I tried several aproaches to the issue at hand and every possivle suggestion on this and other weblogs concerning this solution. Non Work.
I’m on a Unibody MacbookPro running the latest build of Leopard.
~_~
May 30th, 2009 at 4:54 pm
Hi Daan,
I’m sorry that it doesn’t work for you. I’m really unsure why, the output is in standard OPML format and so it should work fine in the readers that support it - of which Google Reader is one of them.
The last time I checked the outputted file was imported successfully in Google Reader. The only thing I’d like to ask is whether you’re importing them into Google Reader correctly (i.e. through the Settings > Import/Export > Browse (find the outputted OPML file) > Upload). If that doesn’t work then let me know by email, and if you’re comfortable with it then send me the OPML file, and I’ll see what I can do for you
Look forward to hearing from you again…. and once again - apologies that it doesn’t seem to work for you.
Cheers,
Daniel
July 5th, 2009 at 8:15 pm
Thanks! Your program worked perfectly.
August 3rd, 2009 at 9:07 am
Hi. Thanks for the code. Got my OPML-file on desktop, no problems there. For some reason Google Reader reports an error trying to import the file. Tried with Safari, Firefox & Omniweb. Same problem with someone above. Have you been able to come up with anything resembling a solution?
Cheers,
Mika.
August 22nd, 2009 at 7:21 pm
A fantastic, simple solution - worked first time in under 5 minutes. Thank you very much!
September 18th, 2009 at 3:09 am
First of all, this is awesome!!! You’ve made a great little tool!
Right now im trying to export my feed to my ipod touch!!! So image the possibilities.
How ever im having a problem… is only grabbing 3 feeds… :/
I don’t know what the problem might be.
When I put the file on my ipods rss reader it says it only read 3. Im stuck….
Help please
October 14th, 2009 at 3:00 am
worked great, thanks so much!
November 18th, 2009 at 10:23 pm
Daniel. Thank you, thank you. Just now I successfully exported OPML from Mail with your script and Evan Doyle’s (thanks Evan!) Terminal “voodoo” and imported into Google Reader via NetNewsWire’s sync.
I’ve been using Mail for RSS feeds and I just have too many now that it’s difficult to follow up on them all. I needed a better app for RSS and I found it with NetNewsWire. Like you, I ran into the issue of exporting RSS from Mail, but luckily a quick Google search led me right to your solution! With NetNewsWire’s Google Reader sync and your script’s OPML I now have 72 feeds regularly synced between two macs and two iPhones, sans Mail.app!
Thank you again!
December 2nd, 2009 at 1:20 am
I had no problem with the instructions nor trouble with the terminal vodoo (although I did use “terminal magick” instead), but I, too, twice have produced an outputted OPML file that importing apps find quite un-parse-able. In fact, Shrook has gone so far as to call the darned thing invalid! The nerve!
So, perhaps there’s something to the couple of similar reports mentioned above.
Any chance you others with troubled OPMLs are, like me, running 10.6?
10.6/iMac 3.06ghz/2GB
December 29th, 2009 at 6:56 pm
I had this issue as well, but found a solution! I have 254 feeds, and it imported 78 of the successfully.
I opened the OPML file to see what was going on and figured it out (at least, in my case) - the 79th one had an ‘&’ in the title. I did a find/replace for all ‘&’ symbols in the title and text tags for the rest of the file (the ones in the URL tags I left alone) and changed them to ‘and’ - this imported into Reader without a hitch!
Your particular problems might not be ‘&’, but check your OPML files for any other suspicious characters that Reader might choke on.
I’m running 10.6.1, for what it’s worth.
January 1st, 2010 at 4:07 pm
I’m getting a few comments about little bugs happening in regarding the outputted OPML file. I’ve noted down some changes that need to be made, and hope to get around to changing them in the next month or so (Lots happening at the moment! It’s going to be a busy 2010!)