Reputation: 1653
I've written an ICS file using the iCalendar module and python.
My trouble is, how can I tell iCalendar to read the ICS file? I thought I could put it in ~/Library/iCalendar/<--->/Events but it seems that just stores the ICS files once they've been imported.
Does anyone know a way I could do this?
Thanks,
Upvotes: 1
Views: 1247
Reputation: 35532
You would use Applescript or Python scripting bridge framework. In either case, tell iCal to add the events.
An example (in Applescript):
tell application "iCal"
tell calendar "Work"
set theDate to current date
make new event at end with properties {description:"The Event Description",
summary:"Event Name", location:"Main Street", start date:theDate,
allday event:true}
end tell
end tell
Or use the same method to just tell iCal to open and import that file.
Upvotes: 1