I have been looking for a way to convert the BBC weather feed for my area to iCal, so I can subscribe to it. It's date-based, after all, and RSS never seemed to me to be an appropriate format for subscribing to weather information. iCal always struck me as being "better" for that purpose. Of course, the BBC only have an RSS feed for local weather. What I needed was a converter.
After some hunting, I discovered that Dean Sanvitale had written a PHP script to convert RSS feeds to iCal format. However, his site (codent.com) appears to be long since abandoned and the script is no longer available from there. Fortunately, the Wayback Machine did have a copy. Dean originally released the script under a Creative Commons License which, fortunately, allows me to make the script available to download from this site (note: the script is available from this site under the same license).
So, if you're looking for a way to convert an RSS feed to iCal, this PHP script will do the job. Thanks Dean!
Source: rss2ical.txt
16 Comments
... how does one initially install this into the iCal program; really need to use this app.... where do i start??
Anthony,
anthonynash_@hotmail.com
#1, ANTHONY, United States, 30 November 2006. Reply to this.
You're welcome!
Glad someone found a use for that old code.
#2, Dean Sanvitale, United States, 21 December 2006. Reply to this.
Cool script - does it work for anyone? My iCal app always say data is not vaild...
#3, Lukas, Switzerland, 30 April 2007. Reply to this.
Typical that I come across this now, after I write my own script! Mine uses MagpieRSS to read the feed. http://www.blogtender.com/2007/05/31/display-an-rss-feed-in-ical/
#4, Tom, New Zealand, 31 May 2007. Reply to this.
Cool script, but I don“t understand how to install it...
#5, Nikolas Schrader, Unknown, 17 October 2007. Reply to this.
Just copy and paste the code into a file with a .php extension on a PHP-enabled web server and view it in a browser.
Fantastic work and code! Thanks!
#6, Josh Thomas, United States, 21 November 2007. Reply to this.
Great program! I like it very much.
It would be wonderful if unicode supported!
I could not use it for Chinese, Japanese or French RSS.
#7, wj, Singapore, 25 November 2008. Reply to this.
Really thanks for the code...
using ur code in php, i have implemented rss to ical & ical to rss in Ruby..
i have posted my code here,,.
http://srikanthjeeva.blogspot.com
Thanks,.
#8, Srikanth, Unknown, 11 February 2009. Reply to this.
Did you take the code down? The link doesn't work anymore. I was excited when I found this page because I don't want to have to write code myself. Have you found any other ways to convert rss to ical?
#9, Doug Royal, 16 January 2010. Reply to this.
I'll port this to javascript so you can run it inside any modern web browser.
I'll place it here with some other utilities of mine:
http://home.comcast.net/~dsanvita
#10, Dean Sanvitale, 1 March 2010. Reply to this.
This site has a good rss2ical converter:
http://www.textbox1.com/apps/rss-to-ical/
I've also posted a javascript version on my site, but unfortunately apple ical can't subscribe directly to it since it does the convert in an embedded script in the page. But it might be useful to see how the code works.
http://home.comcast.net/~dsanvita/rss2ical.html
#11, Dean Sanvitale, 1 March 2010. Reply to this.
I converted my old php script to python for google appengine. It should replicate the basic functionality of the php script, but the smarts that used to sanitize the feed html tags for ical consumption is not in place yet. You can find it at:
http://feed2ical.appspot.com
#12, Dean Sanvitale, 1 March 2010. Reply to this.
Updated http://feed2ical.appspot.com so that html is converted to icalendar compatible text
Replies: #14.
#13, Dean Sanvitale, 1 March 2010. Reply to this.
#13 -- works well but I notice that the timezone is not taken into consideration. I've subscribed to a US website but I'm in Australia so the actual start time is out by a day and 8 hrs.
Any chance of a small mod ;-)
#14, Richard, Australia, 18 October 2010. Reply to this.
hey Dean/all
Dean's script output is not readable by calendar.google.com. See here for details:
http://www.google.com/support/forum/p/apps-apis/thread?tid=447a33f2538969b5&hl=en
thanks!
#15, johny why, usa, 17 January 2011. Reply to this.
I know it's been a while, but this is now fixed. The code is also now in github https://github.com/dsanvita/feed2ical
#16, Dean Sanvitale, USA, 8 April 2013. Reply to this.