View Single Post
The "Calendared in the next seven days (by day of week, from iCal)" script appears to assume 10.8 Mountain Lion uses the same sqlite3 table schema as Lion. Apparently it doesn't.
Code:
sqlite3 ~/Library/Calendars/Calendar\ Cache
.tables
.scheme ZICSELEMENT
reveals 10.8 has moved rolled back to using 'zlocation'... or at least that's how my Calendar database is after moving from 10.6 > MobileMe > iCloud > 10.8

I've modified the script a bit to add in a check for sw_vers 10.8. It assumes 10.8 and later will retain 'zlocation' as opposed to 'zlocation1'

From line 11:
Code:
if [ $OSXVER -eq 7 ]; then
    CALTABLE=zicselement
    REMCODE=24
    LOCN=zlocation1
elif [ $OSXVER -ge 8 ]; then
    CALTABLE=zicselement
    REMCODE=24
    LOCN=zlocation
else
    CALTABLE=zcalendaritem
    REMCODE=9
    LOCN=zlocation
fi