Skip to content

Instantly share code, notes, and snippets.

@vinod1988
Created November 7, 2013 08:43
Show Gist options
  • Save vinod1988/7351231 to your computer and use it in GitHub Desktop.
Save vinod1988/7351231 to your computer and use it in GitHub Desktop.

iCal Geek Talk, turn away now, don't do this, it's the geek way hushed whisper about iCal.

my BS ver 1.0

the problem

  • I use iphone calendar and sync calendar to Snow Leopard, long live the beast!

  • No Google calendar.

  • I installed an app (to remain nameless calendars+ isn't in app store any more)

  • that app thinks I am into Google calendars.

There the trouble starts. That will alter the cal file with, let's call it some extra stuff iCal doesn't like

first, I think this is the simple clean (1 alert) VEVENT block in an ical file

BEGIN:VEVENT
UID:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
DTEND;TZID=America/New_York:20130717T153000
TRANSP:OPAQUE
SUMMARY:This is an appointment with the man.
DTSTART;TZID=America/New_York:20130717T143000
DTSTAMP:20130622T054748Z
SEQUENCE:0
BEGIN:VALARM
X-WR-ALARMUID:ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ
TRIGGER:-PT15M
DESCRIPTION:Event reminder
ACTION:DISPLAY
END:VALARM
END:VEVENT

Keeping it simple, here's what the new "protocol" adds to the EXISTING "VEVENT" blocks

  • In the reminders, one simple error is.
DESCRIPTION:Event reminder

becomes like this

DESCRIPTION:
  • every event, all, get this added:
CREATED:20130920T022047Z
  • Reminder blocks proliferate like rabbits
BEGIN:VALARM
X-WR-ALARMUID:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
TRIGGER:-PT5M
DESCRIPTION:
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
X-WR-ALARMUID:YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY
TRIGGER:-PT5M
DESCRIPTION:
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
X-WR-ALARMUID:ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ
TRIGGER:-PT5M
DESCRIPTION:
ACTION:DISPLAY
END:VALARM
END:VEVENT
BEGIN:VEVENT

There are many corner cases with, for example, all day events, repeating events, etc. But this stuff here is all I look at so far, as it is like the major stuff.

only had time to explore this possibility

In vim this seems to get rid of ALL alert blocks

You DO ThIS? -- NO YOU DO NOT

:%s/\nBEGIN:VALARM\_.\{-}END:VALARM\n/\r/gc  

that's all I have so far

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment