UPDATE: I’ve posted a more complete version of this code in More Ruby Exporting of Groupwise to iCal.
I’ve wanted to export my Groupwise calendar to iCal format for a long time. Every time I try to do it, I ended up running into the same few pages. They sorta worked, but were clumsy.
So I threw this little beauty together in under 10 minutes and 2 google searches. It seems to be a start, though I expect to improve it. Groupwise Object API Docs (PDF format; the web version keeps blinking — arrrgh) from Novell were useful, as was this Ruby gem.
groupwise = WIN32OLE.new(“NovellGroupWareSession“)
# 2nd arg is not password, so leave blank
account = groupwise.Login(“your-username“, ““)
path_to_host = account.PathToHost
cal = Icalendar::Calendar.new
account.Calendar.Messages.each do |message|
next unless message.ClassName == “GW.MESSAGE.APPOINTMENT“
event = cal.event # This automatically adds the event to the calendar
event.user_id = “tims@asrs.state.az.us“
event.timestamp = DateTime.now
event.summary = message.subject.PlainText
event.description = message.BodyText.PlainText
event.start = message.StartDate
event.end = message.EndDate
end
puts cal.to_ical
Every day I find more reasons to love using Ruby. Enjoy!

January 11th, 2006 at 08:29
I was wondering if you wrote this for use on Windows or Mac.
January 11th, 2006 at 13:07
I was on a Windows box at the time I wrote it; though I’m sure I was wishing I was using a Mac.
January 19th, 2006 at 08:57
need to get my groupwise calendar data into ical. How do I get this little programm run on a windows based Groupwise client??
February 1st, 2006 at 15:09
Would you mind explaining a little about what you did AFTER you ran this? The resulting output doesn’t seem to jive with Sunbird or other iCalendar apps when simply copied and pasted into an .ics file. Did you have to adjust the data in some way?
November 27th, 2006 at 16:51
Tim,
You suggest that this script is a good start and you plan to improve it. I tried it out, and like jon, found that there’s something not quite right with the iCal file this script creates (Google Calendar won’t import it). Have you made any improvements to this script, or has it fallen by the wayside to bigger and better (or newer and neater) projects?
I’m not asking you to continue development (though I wouldn’t mind if you did
… I just want to know if the work has already been done before I give it a go.
Thanks!
November 27th, 2006 at 20:46
I’m pretty sure I did improve the script. I’ve made a note to search around for it. If you don’t hear from me within the next week, give me a ping.
December 13th, 2006 at 11:40
Hi Tim,
just following up on the ruby script to export Groupwise to iCal. I can check back with you again after the holidays, no need to find it before. Take care!
Adam
January 19th, 2007 at 09:06
[...] One of my most frequently requested posts is my initial exploration into using Ruby to export my Groupwise calendar to iCal format. The code I posted there was simple, and it almost worked. I figured that’d be the jumping off point for a lot of people to dive in and explore the options Ruby has from there. In retrospect, though, I should also have posted my final version that I worked out a few weeks later. [...]