Create notes from calendar entries

Here’s a tip that might be useful: I’ve been using icalBuddy for some time in programs to extract events from my Calendar and include them in various programs. I recently played with action code in Tinderbox to create child notes with calendar entries:

$eventsList=runCommand(“/usr/local/bin/icalBuddy -npn -nc -eep ‘location,notes’ -b '; ’ -ps ‘/: /’ -po ‘datetime,title’ -tf ‘%H:%M’ -ic ‘Family,Plan’ ‘eventsToday’”);
$eventsList.each(x){
create(x);
$Prototype(x)=“Event”;
$StartDate(x)=$Name(x).extract(“^(.{5})”);
$EndDate(x)=$Name(x).extract(“^.{8}(.{5})”);
$eventName(x)=$Name(x).extract(“^.{15}(.*)”);
};

I set this up as a stamp to use with a parent note, but I’m sure it could also be used in a Rule or Edict.

The Regex code is fairly simple since the icalBuddy output is so specific–but it works for me.

I could see extensions to this code that added a parent name, or included location or note information from the calendar in the child notes.

1 Like