Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible arguments to calendar.save_event() and calendar.search() is poorly documented #253

Open
tobixen opened this issue Jan 15, 2023 · 6 comments

Comments

@tobixen
Copy link
Member

tobixen commented Jan 15, 2023

... and there is calendar.save_todo and calendar.save_journal as well.

@tobixen tobixen added this to the v.1.1 milestone Jan 15, 2023
@gravityfargo
Copy link

gravityfargo commented Feb 4, 2023

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.

@rgerbranda
Copy link

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',

@tobixen
Copy link
Member Author

tobixen commented Nov 28, 2023

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).

@tobixen
Copy link
Member Author

tobixen commented Nov 28, 2023

#221 that was. And #132 (comment)

@rgerbranda
Copy link

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

@tobixen
Copy link
Member Author

tobixen commented Nov 28, 2023

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants