Cardiomyopathy Health ByteOfficially the funniest picture of Rowan Williams

# Mail.app RSS Feeds to OPML

technological, web 2.0 @ 16 July 2008

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.

17 Responses to “Mail.app RSS Feeds to OPML”

  1. daniel Says:

    The precise location of the file is available via the subversion browser provided by Google, and so can be founded precisely here: http://code.google.com/p/mailapptoopml/source/browse/trunk/mailapptoopml.rb

  2. Andrew Says:

    This was just what I needed to get my RSS feeds out of buggy Mail.app. Thanks!

  3. nick Says:

    Thanks for this program! A beautiful solution.

  4. Bookmarks about Opml Says:

    [...] - bookmarked by 3 members originally found by paolog666 on 2008-12-07 Mail.app RSS Feeds to OPML http://vanirsystems.com/danielsblog/2008/07/16/mailapp-rss-feeds-to-opml/ - bookmarked by 3 [...]

  5. John Knotts Says:

    thanks so much!

  6. Felipe Says:

    It says “Permission denied” when I try to use it.

  7. Anders Carling Says:

    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 http://github.com/anderscarling/mailapptoopml/commit/87d38fd812794a3282018bca79c6d32bb57aff61

  8. Slivka Says:

    Exactly what I was looking for! However - I get a “Permission denied” when dragging the script to the terminal. Any idea? Thanks!

  9. daniel Says:

    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

  10. Slivka Says:

    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…

  11. daniel Says:

    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

  12. Slivka Says:

    Same thing: “sudo: /Users/XXX/mailapptoopml.rb: command not found” - hmm… I´m on 10.5.6 if it matters?

  13. daniel Says:

    Ah, yes. You’ll need at least 10.6 I believe… this is due to the requirement of the Ruby programming language.

    Apologies.

    Daniel

  14. Slivka Says:

    That solves my confusion. Thanks for your help! Much appreciated.

  15. Evan Doyle Says:

    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.

  16. Daan Says:

    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.

    ~_~

  17. daniel Says:

    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

Leave a Reply