I use Yahoo! Calendar to keep track of my calendar events. I sync to it from Lightning/Thunderbird and iCal. And use the iSync plugin to sync it to my phone. I also use mutt over a screen session at times. During such times, this is how I update my events to Yahoo! Calendar.
- Save the text/calendar attachment from the mail to a file, say cal.ics
- Determine the UUID of the calendar event. Not the best, but one that works is given beow.
perl -n0e 's/(.*?)UID:(.*?)\w+?:(.*)/\2/gms; s/\s+//gms;print ' tmp/ical.ics
curl -i -k --data-binary '@tmp/ical.ics' -H "Content-Type: text/calendar" -X PUT \
https://caldav.calendar.yahoo.com/dav/<yid>/Calendar/<calendarname>/<uid>.ics \
-u <yid>:<password>
And here is how, I discovered this. Enable debugging in iCal, with these commands and then start iCal from a terminal. You can see the HTTP transactions between iCal and the calendar server.
defaults write com.apple.ical IncludeDebugMenu YES defaults write com.apple.ical LogHTTPActivity YES