And then I decided to quit my job*. Next week will by my last week with ThoughtWorks and I'll need to turn in my laptop. I tend to store as much as possible online so this type of situation isn't a big deal, but going with Mail.app seems to have been a decision in the wrong direction. Maybe Mail.app stores my RSS feeds online somewhere, but it wasn't immediately obvious to me.
A quick google search revealed a Mac OSX Hint on how to dump your RSS feeds to the command line. This was quite helpful, but what I really needed was an OPML file that I could send to NetNewsWire.
I wrote the following script for anyone that finds themselves in the same situation. This script will grab all the feeds and write them to an OPML file. I'm sure it can be cleaned up or done more easily, but this works.
feeds = %x[IFS=$'\n';for i in $(find ~/Library/Mail/RSS/ -name "Info.plist");do grep "<string>http://" $i | sed "s/.*\(http[^<]*\).*/\1/";done].split("\n")
feeds = feeds.collect {|element| element.gsub(/<string>/, "<outline xmlUrl=\"") }
feeds = feeds.collect {|element| element.gsub(/<\/string>/, "\"/>") }
xml = <<-eos
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<head>
<title>mySubscriptions</title>
</head>
<body>
</body>
</opml>
eos
File.open("mail_app_export.ompl", "w") {|file| file << xml }
note: This file works in NetNewsWire, but I had better success by logging on to newsgator.com and importing on their website. When you import on their website it pulls the feed names and other information. The NetNewsWire didn't seem to pull the additional information.
*For those interested, I'm joining DRW Trading.
Hi Jay.
ReplyDeleteI use NewsFire RSS reader (I recommend it) and I had a similar problem migrating my feeds from Mail.app, as NewsFire wanted an OPML file too.
Good luck for your new job.
Ric.
Hum personnaly I use google reader and subscribe to its feed in Opera. It works very well, on every machine I use (home and work) and whatever the OS they use.
ReplyDeleteJay, any chance you'll be able to continue blogging when you go to DRW? Most financial firms are not real keen on the idea of public dissemination of *anything* they are working on.
ReplyDeleteI realize your blog postings are usually very high-level discussions of language features and never give away any client details, but they may not see it that way.
You might want to check their policy if you haven't already.
I'll continue to blog. For 3.5 years I've been blogging without giving away client information, so I don't think I'll have much trouble.
ReplyDeleteThanks for the interest though.
Cheers, Jay
Seems like DRW is mostly a .NET shop (from careers page at least), are you going back into the .NET world or are you going to help bring them the Ruby love?
ReplyDeleteOne of the reasons I took a job at DRW was because they are interested in using the right tool for the job. A lot of people talk about it, they seem to actually do it.
ReplyDeleteSo, I expect to do some C#, Ruby, C++, Perl, and several other languages -- which will probably be reflected by future blog entries.