Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

gCal & OS X Leopard

Help
2007-07-22
2013-04-23
1 2 3 > >> (Page 1 of 3)
  • MonsoonDawn
    MonsoonDawn
    2007-07-22

    It looks like Apple OS X 1.5, aka Leopard, introduces some changes to iCal storage. Rather than a single "corestorage.ics" file there is now an info.plist and a separate .ics file for each event. Is gcal being updated to accommodate this change?

     
    • aberkes
      aberkes
      2007-07-29

      Yes, I'd like to accommodate this modification. Could anybody possibly send me one zipped calendar directory (including info.plist and ics files), please? Just for testing. Any help greatly appreciated. Thanks!

       
    • MonsoonDawn
      MonsoonDawn
      2007-07-29

      You should have received a set of test calendars from me a few days ago. Yes?

       
      • aberkes
        aberkes
        2007-07-30

        unfortunately not, please resend me this file. thank you very much!

         
    • aberkes
      aberkes
      2007-08-14

      First, I really thank you for the test files!

      It was very useful to see what changed in the iCal storage.
      I uploaded the first test version with Leopard/iCal support:

      http://downloads.sourceforge.net/gcaldaemon/upgrade-beta13-to-beta13i.zip

      Please unzip this ZIP's content into the GCALDaemon/lib folder.

      ------ new syntax to the storage file(s) ------

      Old (but henceforward supported) syntax:

      # Full path of the local iCalendar file
      file.ical.path=/Users/tom/Library/Application Support/iCal/Sources/7F3D6701-C15D-4CAD-8218-F9B508E9B122.calendar/corestorage.ics

      Leopard-style syntax:

      # Wildcarded file path to the iCalendar files
      file.ical.path=/Users/tom/Library/Application Support/iCal/Sources/7F3D6701-C15D-4CAD-8218-F9B508E9B122.calendar/*.ics

      ------ comments ------

      1) GCALDaemon concatenates all calendar files in the specified directory to one temporary calendar, update/modify/remove events, then splits the modified calendar to separate .ics files.

      2) Config editor (GCALDaemon/bin/config-editor.sh) supports this ("*.ics") syntax too.

      3) GCALDaemon renames the .ics files (I don't know if this is a problem or not, please try it out)

      Thanks,
      Best Regards
      -A

       
    • RubenLaan
      RubenLaan
      2007-09-07

      Hi,

      I'm working with Leopard. The Calendar event-files are somewhat elsewhere than you described... I found them here:

      /Users/rlaan/Library/Calendars/7AC8EF3F-BA59-4642-986E-3DBF995EBE72.calendar/Events/*.ics

      The Plist file and Events folder is in:

      /Users/rlaan/Library/Calendars/7AC8EF3F-BA59-4642-986E-3DBF995EBE72.calendar/

      I'm afraid that even pointing the daemon to the above Events folder doen't do the trick for me.

      ruben-van-der-laans-macbook:~ rlaan$ /Applications/gcaldaemon-linux-1.0-beta13/GCALDaemon/bin/sync-now.sh
      INFO  | GCALDaemon V1.0 beta 13i starting...
      INFO  | RSS/ATOM feed converter enabled.
      INFO  | Local time zone is Central European Time.
      INFO  | Start listening file /Users/rlaan/Library/Calendars/7AC8EF3F-BA59-4642-986E-3DBF995EBE72.calendar/Events...
      INFO  | File listener started successfully.
      INFO  | Offline file synchronization enabled.
      WARN  | Received file from Google:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8">
      <title>Agendafout</title>
      <style type="text/css">
      body,td,div,.p,a,font,span {font-family: arial,sans-serif}
      .bubble {background-color:#C3D9FF}
      .tl {background-image: url(/calendar/images/corner_tl_gmail.gif);
      background-position:top left;background-repeat:no-repeat}
      .tr {background-image: url(/calendar/images/corner_tr_gmail.gif);
      background-position:top right;background-repeat:no-repeat}
      .bl {background-image: url(/calendar/images/corner_bl_gmail.gif);
      background-position:bottom left;background-repeat:no-repeat}
      .br {background-image: url(/calendar/images/corner_br_gmail.gif);
      background-position:bottom right}
      .tl, .tr, .bl, .br {background-repeat:no-repeat}
      </style></head>
      <body bgcolor="#ffffff" style="margin-top:2px"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"><tr valign="top"><td width="1%"><a href="http://www.google.com/calendar"><img border="0" width="143" height="57" align="left" vspace="10" alt="Google Agenda" src="/calendar/images/calendar_sm2_nl.gif"></a></td>
      <td width="99%" bgcolor="#ffffff" valign="top"><table width="100%" cellpadding="1"><tr valign="bottom"><td><div align="right">&nbsp;</div></td></tr>
      <tr><td nowrap><table width="100%" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:5px;background:#C3D9FF"><tr><td class="bubble tl" width="4"></td>
      <td class="bubble" rowspan="2" style="font-family:arial;text-align:left;font-weight:bold;padding:3px,0px;"><b>Agendafout</b></td>
      <td class="bubble tr" width="4"></td></tr>
      <tr><td class="bubble bl" width="4"></td>
      <td class="bubble br" width="4"></td></tr></table></td></tr></table></td></tr></table>
      <br>
      <table width="94%" border="0" align="center" cellpadding="5" cellspacing="0"><tr valign="top"><td><p><font size="-1">Agendafout</font></p></td></tr></table>
      <br><br>
      <table width="95%" align="center" cellpadding="3" cellspacing="0" style="margin-bottom:5px;background:#C3D9FF"><tr><td class="bubble tl" width="4"></td>
      <td class="bubble" rowspan="2" style="font-family:arial;text-align:center;"><font size="-1" color="#666666">&copy;2007
      Google -

      etc. etc.

      And nothing happens either in iCal or in gCal. But sometimes once in a while it works...If you need help just holler and I'll send anything you need.

      thanks

      Ruben

       
    • RubenLaan
      RubenLaan
      2007-09-07

      Furthermore this happens:

      NFO: No child handler for sequence. Treating as an extension element.
      Sep 7, 2007 9:24:00 PM com.google.gdata.util.XmlParser$ElementHandler getChildHandler
      INFO: No child handler for uid. Treating as an extension element.
      Sep 7, 2007 9:24:00 PM com.google.gdata.util.XmlParser$ElementHandler getChildHandler
      INFO: No child handler for sequence. Treating as an extension element.
      Sep 7, 2007 9:24:00 PM com.google.gdata.util.XmlParser$ElementHandler getChildHandler
      INFO: No child handler for uid. Treating as an extension element.
      Sep 7, 2007 9:24:00 PM com.google.gdata.util.XmlParser$ElementHandler getChildHandler
      INFO: No child handler for sequence. Treating as an extension element.
      Sep 7, 2007 9:24:00 PM com.google.gdata.util.XmlParser$ElementHandler getChildHandler

      And that takes forever ;-)

      Anyways, for some reason after trying multiple times the post before this one withe big error can be forgotten that doesn't happen anymore...

      Cheers

      Ruben

       
    • RubenLaan
      RubenLaan
      2007-09-17

      Hi,

      Interesting to know that after a while iCal stops recognizing the Calendar files completely! If I can help here just let me know.

      Ruben

       
    • aberkes
      aberkes
      2007-09-22

      Hi Ruben, thanks for your feedbacks!

      1) What does "Agendafout" mean? ("Calendar" or "Forbidden"?)
      2) No child handler for sequence. -> This effect fixed in beta14
      3) This folder structure is new for me:

      /Users/rlaan/Library/Calendars/7AC8EF3F-BA59-4642-986E-3DBF995EBE72.calendar/Events/*.ics

      Could you send me one zipped calendar directory (with events and todos), please? Eg. the entire zipped "/Users/rlaan/Library/Calendars/7AC8EF3F-BA59-4642-986E-3DBF995EBE72.calendar" folder. I'll keep it confidental of course, and I'll delete this directory after the tests.
      There's a lot of work to be done on Leopard compatibility, but I'd like to move on.
      Thank you!!!

       
    • RubenLaan
      RubenLaan
      2007-09-27

      Hi Aberkes,

      I mailed you some stuff... just let me know what goes...

      Ruben

       
    • RubenLaan
      RubenLaan
      2007-09-27

      "Agendafout" means calendarerror (in Dutch)

      Ruben

       
    • aberkes
      aberkes
      2007-10-13

      Please help, where are the todo/task entries under the 'iCal/Sources' folder?

      Leopard's iCal stores events here:

      /Users/*/Library/Application Support/iCal/Sources/*.calendar/Events/*.ics

      What is the correct path for TODO entries? Maybe under the 'Todos' subdirectory?

      /Users/*/Library/Application Support/iCal/Sources/*.calendar/Todos/*.ics ???

      Thanks!
      -A

       
    • RubenLaan
      RubenLaan
      2007-10-14

      Hi A,

      Right in the events folder along with the calendar events.

      BEGIN:VCALENDAR
      VERSION:2.0
      PRODID:-//Apple Inc.//iCal 3.0//EN
      CALSCALE:GREGORIAN
      BEGIN:VTODO
      PRIORITY:0
      SEQUENCE:3
      UID:295AF233-1168-4E4D-9BEC-A18AB6644ADB
      DTSTAMP:20071014T111025Z
      SUMMARY:test todo
      CREATED:20071014T111019Z
      X-APPLE-SORT-ORDER:1073741823
      END:VTODO
      END:VCALENDAR

      Again they are all loose files: above is one.
      And serious the path is as I described before:
      /Users/rlaan/Library/Calendars/63777665-AA7F-493A-A934-D5DDB025B0BA.calendar/Events/*.ics

       
    • quitbuggingme
      quitbuggingme
      2007-10-27

      I can confirm that this works in beta 14 with leopard final, except that you have to delete Calendars/Calendar Cache every time to make iCal re-read the ics-files. Calendar Cache looks like an sqlite database.

       
      • aberkes
        aberkes
        2007-10-27

        Thanks for this information!
        Is the Calendar Cache file a single file somewhere? Do you know the file's name/path?
        Should I delete the sqlite file after the synchronization?
        Thank you!
        -A

         
        • Shawn Parr
          Shawn Parr
          2007-10-30

          The file is located at:

          /Users/{username}/Library/Calendars/Calendar Cache

          Note that there is a space in the file name.  Deleting this file seems to not do any harm.

          Also note that it is in the new official location for the calendar files.  Those files are no longer in ~/Library/Application Support, trying to delete something there will either not work, or create problems.

          If you were to delete the file after each sync it should work, at least it has in my limited testing this evening.  I currently have the system hacked up with a Launchd script calling the sync-now.sh script every 10 minutes, and I added an rm to the end of that script to delete the Calendar Cache file.

           
    • Mitch G
      Mitch G
      2007-10-27

      Can someone provide new directions for Leopard? I would LOVE to get this up and running!

       
    • Jim Whitehead
      Jim Whitehead
      2007-10-28

      I'm available and reasonably familiar with both GCalDaemon and Leopard.  Willing to assist in any way possible to get this back up and working in the best way possible.  Please feel free to contact me directly.

       
    • RubenLaan
      RubenLaan
      2007-10-29

      I made a little applescript that deletes the cache file after the sync, seems to do the trick. the cache file is in the following location:

      /Users/rlaan/Library/Calendars/Calendar\ Cache

      Cause I don't know anything about java and stuff I made a cron that runs the sync now script and the apple script in one... However this means that delete actions don't go to Gcal yet...

      Ruben

       
    • RubenLaan
      RubenLaan
      2007-10-30

      I'm afraid the whole architecture of ical makes it rather difficult to change items, i'm trying to delete events from my calendar and after that delete the cache file, delete the files manually in gcal and delete the com.apple.ical cache folder in the Caches folder in my library, even then if I restart iCal some events return. And if I restart iCal more times all events return... quite strange....

       
    • tijerdyr
      tijerdyr
      2007-10-30

      Yes, the architecture is different. The *.ics files are mostly in service of Spotlight, and makes it much easier for Apple to allow spotlight to search all kinds of different events, and mail them to contacts as well.

      Therefore, the main target (apart from making the relevant *.ics files that GCALDaemon already makes) is to update the Calendar Cache in ~/Library/Calendars/.

      The Calendar Cache is actually a SQLITE3 database, and it's quite easy to see how it works by dumping it (sample below). It needs more testing, but using sqlite3 it should be possible to just add rows to the ZCALENDARITEM table, or alter rows if there has been a change. This will require some coding, and testing, but it's a step in the right direction to supporting Leopard.

      $ sqlite3 ~/Library/Calendars/Calendar\ Cache .dump

      BEGIN TRANSACTION;
      CREATE TABLE ZALARM ( Z_ENT INTEGER, Z_PK INTEGER PRIMARY KEY, Z_OPT INTEGER, ZRELATIVETRIGGER INTEGER, ZOMITSYNCRECORD INTEGER, ZITEM INTEGER, Z4_ITEM INTEGER, ZABSOLUTETRIGGER TIMESTAMP, ZSUBJECT VARCHAR, ZSOUND VARCHAR, ZEMAILADDRESS VARCHAR, ZMESSAGE VARCHAR, ZACTION VARCHAR, ZUID VARCHAR, ZURLSTRING VARCHAR );
      CREATE TABLE ZATTACHMENT ( Z_ENT INTEGER, Z_PK INTEGER PRIMARY KEY, Z_OPT INTEGER, ZOMITSYNCRECORD INTEGER, ZITEM INTEGER, Z4_ITEM INTEGER, ZISCACHED INTEGER, ZISAUTOARCHIVED INTEGER, ZURLSTRING VARCHAR, ZCONTENTTYPE VARCHAR );
      CREATE TABLE ZATTENDEE ( Z_ENT INTEGER, Z_PK INTEGER PRIMARY KEY, Z_OPT INTEGER, ZRSVP INTEGER, ZOMITSYNCRECORD INTEGER, ZTYPE INTEGER, ZEVENT INTEGER, ZCOMMONNAME VARCHAR, ZROLE VARCHAR, ZSTATUS VARCHAR, ZADDRESSSTRING VARCHAR );
      INSERT INTO "ZATTENDEE" VALUES(3,1,1,0,0,1,273,'My Name','REQ-PARTICIPANT','ACCEPTED','MAILTO:myname@myname.com');

      --- (more ZATTENDEE's here) ---

      CREATE TABLE ZCALENDARITEM ( ZISALLDAY INTEGER, ZISDETACHED INTEGER, ZISMYRESPONSEDIRTY INTEGER, ZPRIORITY INTEGER, ZHASATTACHMENT INTEGER, Z_ENT INTEGER, ZORDER INTEGER, ZSEQUENCE INTEGER, Z_PK INTEGER PRIMARY KEY, ZMASTEREXCEPTION INTEGER, ZISRSVPNEEDED INTEGER, ZOMITSYNCRECORD INTEGER, ZHASDROPBOX INTEGER, ZISINVITATIONSENT INTEGER, ZISINVITATIONDIRTY INTEGER, ZHASALARM INTEGER, ZCALENDAR INTEGER, Z19_CALENDAR INTEGER, ZSTATUS INTEGER, ZHASATTENDEE INTEGER, ZISTRANSPARENT INTEGER, ZHASRECURRENCEEXCEPTION INTEGER, Z_OPT INTEGER, ZNEEDSREPLY INTEGER, ZCREATIONDATE TIMESTAMP, ZDATESTAMP TIMESTAMP, ZSTARTDATE TIMESTAMP, ZENDDATE TIMESTAMP, ZDUEDATE TIMESTAMP, ZCOMPLETEDDATE TIMESTAMP, ZORGANIZERADDRESSSTRING VARCHAR, ZLOCATION VARCHAR, ZRECURRENCERULE VARCHAR, ZLOCALUID VARCHAR, ZTITLE VARCHAR, ZDROPBOXLOCATION VARCHAR, ZNOTES VARCHAR, ZURLSTRING VARCHAR, ZTIMEZONE VARCHAR, ZORGANIZERCOMMONNAME VARCHAR, ZSHAREDUID VARCHAR );
      INSERT INTO "ZCALENDARITEM" VALUES(1,NULL,0,NULL,0,5,NULL,0,1,NULL,0,0,0,0,0,0,2,23,2,0,0,0,1,0,215473198,215472656,196732800,196992000,NULL,NULL,NULL,'',NULL,'local_58CDA00D-9722-4FAE-96CF-D1FB390BA35C','My friend is visiting',NULL,'',NULL,NULL,NULL,'me@me.com');

      --- (all the ZCALENDARITEM's here!!) ---

       
    • tijerdyr
      tijerdyr
      2007-10-31

      Just an extra note to the post above. iCal automatically updates the calendars if you insert the correct rows into the Calendar Cache sqlite-database, corresponding to the added *.icns files.

       
    • Can somebody please post finished directions as to how to get this working on Leopard? I downloaded beta 14, downloaded the new .jar file included in the zip above, changed the location of my calendar to have the Events/*.ics at the end instead of what it was before, deleted the Calendar Cache file in my user directory, and I still can't get this to sync.

      2007-11-01 17:03:12 | DEBUG | OnlineFileListener | Loading file /Users/mhedstrom/Library/Application Support/iCal/Sources/196D8A01-5B0E-4C6E-B82E-709C140A6FC7.calendar/Events...
      2007-11-01 17:03:12 | DEBUG | OnlineFileListener | File loaded successfully (171672 bytes).
      2007-11-01 17:03:12 | DEBUG | GCalUtilities  | Loading calendar from <google calendar url here>
      2007-11-01 17:03:15 | DEBUG | GCalUtilities  | Set the offset of America/Denver to GMT-0700.
      2007-11-01 17:03:15 | DEBUG | GCalUtilities  | Calendar loaded successfully (171672 bytes).
      2007-11-01 17:03:15 | DEBUG | Synchronizer   | Starting Google Calendar synchronizer...
      2007-11-01 17:03:17 | INFO  | OnlineFileListener | Synchronization finished.

      Thanks.

       
    • RubenLaan
      RubenLaan
      2007-11-02

      As you can see in the above posts it is unlikely that you can do more than a test sync. Since iCal now uses a sqlite3 database to store the events the whole sync engine should be redesigned.

      Basically you can sync now and any changes will jump back after you sync again...

       
    • tijerdyr
      tijerdyr
      2007-11-03

      In relation to my other posts about the sqlite3 database, perhaps it'll be safer for future use, to implement the adding and altering of events through applescripts.

      Applescripts can be run through commandline via osascript

      Example of adding an event (lots of stuff on google about this):

      on run {theCalendarName, StartDate, endDate, alldayFlag, theSummary, theDescription}
        
         set theStartDate to date StartDate
         set theEndDate to date endDate
         if alldayFlag is "true" then
            set allDay to true
         else
            set allDay to false
         end if
        
         tell application "iCal"
            tell calendar theCalendarName
               make new event at end of events with properties {start date:theStartDate, end date:theEndDate, allday event:allDay, summary:theSummary, description:theDescription}
            end tell
         end tell
      end run

       
1 2 3 > >> (Page 1 of 3)