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.

23 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: https://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 https://www.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 https://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

  18. Lynn Gobin Says:

    Thanks! Your program worked perfectly.

  19. Mika Says:

    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.

  20. Martin Says:

    A fantastic, simple solution - worked first time in under 5 minutes. Thank you very much!

  21. Cesar Says:

    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

  22. david Says:

    worked great, thanks so much!

  23. Jesh Barlow Says:

    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!

Leave a Reply