Open tobixen opened 1 year ago
Parameters for search are listed well. The same for save_event
/ save_todo
would be nice.
ical_fragment
## ical_fragment parameter -> just some lines
## ical parameter -> full ical object
confuses me as well.
Edit: This?
Edit:
print(obj.icalendar_component.keys())
told me what I needed to know
$ odict_keys(['CREATED', 'DTSTAMP', 'LAST-MODIFIED', 'SUMMARY', 'UID'])
Another edit: The section "# Property types" at the bottom of icalendar.prop seems to have a comprehensive list.
Did anyone manage to add an alarm using the props?
The following is listed, but doesn't seems to work.
# Alarm Component Properties
'action': 'text',
'repeat': 'integer',
'trigger': 'duration',
Is that when doing calendar.save_event()
? Alarms are badly supported (though it should be possible to add them i.e. through event.icalendar_component['VALARM'] = ...
).
I was working a bit on alarms at one point, but ran out of time ... I think that work is still in a separate branch (with a draft pull request and an issue attached).
No problem, I can use Ical data to add VALARM
I had the following error when adding the event, but that was caused by extra linebreaks at the beginning and ending of the Ical data. Removed the linebreaks in the Ical data, now it is working fine.
Ical data was modified to avoid compatibility issues
That's not an error, that's a warning. It's a bit of a bugger, a caldav library is expected to pass the icalendar data unmodified, still I want to be flexible and pragmatic and do whatever I can for things to just work - so that includes fixing broken icalendar data. At some point I decided to add a warning about it - it's been a bugging problem particularly for some HomeAssistant users that gets lots of those messages stuck in the log :-)
... and there is
calendar.save_todo
andcalendar.save_journal
as well.