Google Calendar to Palm Desktop conversion

(The short story is: if you want to convert Google Calendar iCal v2 files to vCal v1 files for import into your Palm Desktop, use this web application I made last night. Please leave a comment on this posting if you use it!

If you’re interested in recent changes to the application, see the dynamic changelog on Google Code.)

It’s amazing how just when you really do need to put all your time into some deadline, you find the perfect WAB, better known as Work Avoidance Behaviour.

In any case, last night I was planning to work on two proposals with rapidly approaching deadlines, instead I somehow was convinced that it should be easy to import some of those neat iCal v2 files available on the web (for example as exported from Google Calendar) into my trusty Palm Desktop 4.1, which I use on my laptop to manage my life and synchronise with my Palm Tungsten C.

It turns out that this is far more complicated than necessary. Google Calendar only outputs iCal version 2, Palm Desktop, even the latest version, only imports vCalendar version 1. There are a number of websites that state that simply renaming the .ics file to .vcs, and changing the version tag to 1.0 does the trick. WRONG. Google Calendar iCal files actually use iCal version 2.0 features, so this idiot workaround does not, well, work around.

By now it was almost time for bed, and I’d tried Sunbird (exports ical v2), Evolution (the windows version is the worst POS software I’ve ever come across) and bunches of other things. No go. Finally I stumbled on vcal.py by Mark Bucciarelli. This almost worked, except for a few bugs (empty field handling, a.o.) which I fixed, and the fact that it doesn’t handle RRULEs at all. After reading the vcal standard, I implemented a really ugly RRULE transformation that seems to do the trick, mostly.

I’ve packaged all of this ugliness in a simple CGI that you can now use to convert Google Calendar iCal version 2.0 files to vCal version 1.0 files for consumption by your Palm Desktop. Use this entirely at your own risk of course, but let me know in a comment on this post (see below) if it works, or if it doesn’t.

Click here to convert!

(if you’re interested in the patch source, go to the ical2vcal site on googlecode.)

Related posts:

  1. Copernic Desktop Search 1.6
  2. Palm News
  3. Tungsten-E approaching at high speed
  4. Popup tabs for Linux?
  5. First thoughts on the Tungsten E

231 Responses to Google Calendar to Palm Desktop conversion

  1. Yo Charl, neat – but can this approach also work for the nokia E61 ? I’m sure finishing the 2 deadlines is easy now, after having solved this one, right. Ant

  2. Haha Anton!

    The Nokia sync software probably has better options for importing iCal files (or perhaps even subscribing to an online iCal). If you’re syncing via Outlook, there are even more options.

  3. Yo charl, who wants to sync via outlook ….horrible – the thought alone , not even thinking about the possibility that it might work. But the nokia is cool.

  4. Cool! Works like a charm. People sent calendar invites to me in .ics format and now I can use your tool to import them into my Palm.

    Thx!

  5. how about taking info in palm desktop to google calendar? can this program help update both?
    -m
    ps i don’t know understand most of what you are talking about, but thanks for avoiding work and doing this!

  6. i just bought my treo today and needed a google calendar conversion badly – thanks so much! it works perfect! :)

  7. Thank you so much. works great. the most effective method out there

  8. Excellent Job. Works Nicelly.
    Maybe a direct VCS Generator in the next version???
    :) They always want more….

  9. Strange, just tried converting another ical file to goocal to .vcs and it doesn’t seem to work :( It says that an error has occurred while importing and that the vcal file may not be a valid one :(

  10. Kevin Herrmann

    It looks like under the license terms of the original script, you should publish the source code — you game?

    Thanks,
    Kevin

  11. Of course. :) It was merely a question of 1. ugliness of patch and 2. lack of time (remember, this was a WAB to begin with). I’ll put it up somewhere soonest…

  12. I’m probably uneducated, but I couldn’t figure out how to save my “resulatant text file” as a .vcs file. Any suggestions?

  13. Hi, that worked great! Thanks!

  14. @10: Please send me the file so I can have a look at it.

    @deares: When you’ve selected a file and clicked on the “Convert to VCAL” button, you’ll see a large amount of text in your browser. Now select “Save Page As” from your browser’s “File” menu and save as a .vcs file. Let me know if you need any more help.

  15. Hi!
    This again is one of the building blocks for an entirely open source solution for syncing Palm Desktop to Google Calendar. I think it should be possible to achieve fully automated, two-way synchronisation if you combine this script with GCALDaemon (see http://gcaldaemon.sourceforge.net/). Please let me know if I can help with this, I’m a Java programmer…

  16. Martin Edgar

    A great little utility.
    As you say in your intro, a lot of people don’t seem to realise there are subtle differences between the formats.
    Thank you!

  17. Worked great the first time. But then when I moved a calendar item and then went through the process again, I ended up with double entries for everything. And if I do it again, I’m sure I’ll end up with triple entries.

    It looks like the solution is first to erase the calendar in the Palm? I can delete using Tools > Categories IFF the entries are categorized as Business, Personal, etc. But the conversion seems to bring them in as Unfiled, and that cannot be deleted.

    I’m guessing I’m missing something here. But what?

    Thanks.

  18. After fooling around a bit, I find that the answer is easy in the desktop-based program. Just close the program, delete …\datebook\datebook.dat, and then reopen. A new empty file is created.

    But the data in the Palm Pilot itself remains, and that leads to duplicate entries when the desktop program is updated and then synced with PP.

  19. Nick Kliewer

    You rock! This worked perfectly. (I just bookmarked it). Thanks so much for writing this and sharing your work on the subject.

    Best regards,
    -Nick

  20. Didn’t work for me – here is what I got.

    Error parsing your upload: vCal Parse Error: No BEGIN:VCALENDAR–invalid vcal file (at character 0)

  21. @Epizoic:

    This could mean that you have an invalid ical file… if you mail me the file, I could have a look at it to see what’s going wrong.

  22. hi,

    your CGI program saved me lots and lots of trouble.

    i’m a Outlook Treo user. i loathe Palm Desktop, so i use the PocketMirror Outlook combo, but my university’s timetable system only supports iCalendar, so my upcoming year schedule is only available in the darn *.ics format.

    i scoured the ‘net trying to find an iCal to vCalendar converter: nothing. then i came across your converter. it worked extremely well. for some reason, it didn’t recognise any reoccuring events (which there are), but that didn’t really matter too much as long as the first event (to be repeated) is fine.

    i give it a good 8.5 out of 10. dock a point for the reoccurance glitch, and half a point for hiding in such a small corner of the internet. great job!

  23. when importing to palm desktop for mac i lost all the times of appointments. any suggestions?

  24. Wow! This seems to work with Windows Calendar in Vista too! Thanks so much!

  25. @george: (and anybody else with problems)

    It’s impossible for me to see what went wrong if you don’t send me a sample ical file to test on. If you send an ical file that causes problems on your side, I can try and reproduce the problem and perhaps even fix it. :)

  26. Charl,

    I love the app, but can’t seem to get it to work. i’ll send you my files (before and after) if you like. palm gives me the ‘not a valid vCal file” error message when trying to import, although the code coming out of the cgi looks alright. the only thing i can think is that it may be a lot of reoccurring entries that is goofing it up.

    need your email address. mine is sfshawATrunbox.com
    Cheers,
    Stephen

  27. Pingback: Tangled Web at vdMerwe.net

  28. I would love to use this tool. I keep getting this error :Error parsing your upload: vCal Parse Error: Missing END:VEVENT–invalid vcal file (at character 719544)

    I have used the tool in IE, Firefox and Safari on both my Win PC and on My Mac G4. Any suggestions? I would be happy to mail the file if it helps.

    Thanks!

    Mark

  29. @Mark:

    I’m currently debugging Stephen’s example vcal file (when time permits). If you could send me the vcal file that’s causing the error that you report, I can try to reproduce it on my side and hopefully fix it (or tell you where the vcal file is broken :).

    You could also check the vcal file at byte position 719544 to see if there’s anything strange at that point.

  30. Reuben Cummings

    It works but not by selecting “Save Page As”. When I opened the resultant vcs file in notepad, it was filled with HTML garbage. After I copied and pasted the text from the webpage and resaved, it worked fine.

  31. @Reuben Cummings:

    “Save Page As” does work if you set the type to “Text Files”. Cutting and pasting is of course also an effective method. :)

  32. notaslavetofashion

    Yo, dude, it, like, told me that my dates were, like, “out of range” man. Hella peanuts, brah. Way to harsh my palm buzz.

  33. This looks fantastic–is there a way to run it backwards?

  34. Bingo dude! Works just like you said. I had to copy the resultant text file and paste it into notepad to save as a .vcs file, but once I got through that, imported just fine. Thanks!

  35. Douglas Baumwall

    I use companionlink to sync Act!, Palm, and Google calendar. It’s not free but it’s worth every penny

  36. Greetings.

    Nice job on the conversion script.

    Have you made the source available? If so, where? If not, do you intend to do so? If so, when? If not, why?

  37. Real Soon Now. ™ It’s a time problem… however, if you mail me, I can send it to you directly.

  38. Jim Ballantine

    Hi,

    You said you could send a copy of the calendar conversion source directly. Would you pleases
    forward me a copy?

    Thanks and enjoyed the script.

    Jim

  39. Jim Ballantine

    Hi again,

    Turns out I have several ics files with RRULES that when they get translated, and I import them into palm desktop, I get the message “Import can not handle repeat rule”. In one case it just repeats the appointment every day.
    One is:
    ics file:
    PRODID:Microsoft CDO for Microsoft Exchange RRULE:FREQ=WEEKLY;UNTIL=20071231T200000Z;INTERVAL=1;BYDAY=WE;WKST=SU
    vcs file:
    RRULE:WP1 WE 20071231T200000Z

    While it give the error message, it seems to repeat ok.

    The other is:
    ics:
    PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
    RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
    vcs:
    RRULE:D1 20311231
    and this just repeats daily

  40. Hmmmmmmm …

    Error parsing your upload: vCal Parse Error: vcal.duration2seconds: invalid duration “3″ (at character 0)

    But at all: very useful!
    (A “Standalone” would be my favorite!)

    Guy B.

  41. Hi,

    I could convert my ics file into a vcs file. But I couldn’t import the vcs file to my Palm. It says that it’s an invalid file.
    I would like to send you a copy of my file. Plz e-mail me with ur add. (I suppose you can see my e-mail add, right?) :)

  42. Hey,
    used this and it works well. Thanks!

    However when I import it all my repeating appointments are ignored. Saying ‘import can not handle the Repeat Rule.’

    Just FYI.

    Thanks!

    JT

  43. Thanks for doing this. Worked for me. Please send the source code.

    Tyler, As for converting vcs to ics, it shouldn’t be necessary. Most progs which can import ics will also be able to import vcs.

    I would suggest some simple stuff:

    Allow pasting the calendar text into a box (instead of having to create a file) as an option. This is simpler for text in messages and might be easy for you.

    Indicate when the file is empty or non-existent. This was my first error… You could also show the first dozen characters where the file was the wrong one.

    Ideally, it should be a stand alone program which converts a file (or pasted text) and passes it to a program or the default vcs handler.

  44. @Tom Trottier:

    Whoops, I’d made this available a while back but forgot to post the link. Here it is: http://visualisation.tudelft.nl/~cpbotha/files/ical2vcal-0.1.tar.gz

  45. Thank you!! I did get the message about a problem with Repeat rules, but it all imported. I had duplicates, but since I could delete all occurrences of one or the other, it wasn’t a huge job to clean that up. It will be a bit more tedious to remove all the Palm birthdays which are now duplicated as Repeating Events from Google because I have to go into each Palm contact to remove the birthday. Thanks again; this was a great help!

  46. Wonderful; worked like a charm!

    I’ve spent the last hour trying to convert this file. Four clicks on your app and I’m finally done! WOOHOO!
    Thanks a ton!

  47. I tried it and got this error.

    Error parsing your upload: mktime argument out of range

    My calendar is here

    http://www.google.com/calendar/ical/neum2p5u5mf1ehgo5r1nssvujk@group.calendar.google.com/private-5d7e9e8030010c2e815848930e5e0110/basic.ics

    Thanks for you help
    Bob

  48. Thanks
    This works!

  49. I have error message come up after saving file to vcs could I send you the file for help

  50. @JB: What error message are you getting?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>