python-caldav / caldav

Apache License 2.0
328 stars 97 forks source link

Support for alarms #132

Open tobixen opened 3 years ago

tobixen commented 3 years ago

The processing of alarms as described in https://tools.ietf.org/html/rfc4791#section-8.6 is outside the scope of the caldav library, possibly with the exception of sending emails. Anyway, the library should support methods for alarm discovery.

newhinton commented 3 years ago

will this include setting new alarms?

tobixen commented 3 years ago

Setting new alarms is possible through the library today. It's part of the icalendar data sent to the server, generation of this data is outside the scope of the caldav library.

tobixen commented 2 years ago

generation of this data is outside the scope of the caldav library.

I have reconsidered this a bit.

So, to fully support alarms, I think we may need to support ...

Adding alarms

It's always possible to add alarms by editing the raw icalendar, or editing it via the vobject_instance or icalendar_instance properties. However, recently we've started adding multiple "high level" convenience methods and parameters for editing and generating icalendar code, so we may as well add explicit support for alarms. So it's needed with:

Finding alarms

Processing alarms

The RFC defines four kind of alarm actions, it's sound, display, email and procedure. This library is definitively not going to play and sounds or display something for the end user. This library could theoretically send emails or launch procedures. However, since this library does not have any kind of event loop or other means of getting the timing correct, I feel that all kind of processing is out of the scope for this library and should be taken care of by the caller.

tobixen commented 2 years ago

If anyone has a great needs for alarms, I will prioritize this and get it merged, testing it towards a calendar server that supports searching for alarms. It seems like neither radicale nor xandikos supports searching for alarms yet, and those two are my primary test servers.

tobixen commented 8 months ago

So I basically wrote some code (but no documentation) for adding alarms easily to new events long long time ago, but got busy with other things. I will try to prioritize to get it merged in, problem is that I have no idea when I will get time to do any work towards the caldav library next time. Perhaps tomorrow, perhaps next week, perhaps next month ...