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

CalDAV/iCal libraries suboptimal #1

Open
yuwash opened this issue Nov 25, 2023 · 0 comments
Open

CalDAV/iCal libraries suboptimal #1

yuwash opened this issue Nov 25, 2023 · 0 comments

Comments

@yuwash
Copy link
Owner

yuwash commented Nov 25, 2023

The “double parsing” happening between python-caldav and ics is a bit suboptimal. The reason for the situation is

Apparently it’s not possible to use python-caldav in a way that it only extracts the ical string, but not yet parsing it. The data attribute is only found on CalendarObjectResource layer e.g. Todo, but not on Calendar. The initial extraction of ical string from CalDAV is apparently happening within Calendar and not on DAVClient. The data is a complete VCALENDAR (containing just the one todo) rather than just the VTODO part. On the other hand ics only supports parsing complete calendars (or just individual lines) so this fits well together in a way.

Thus the current approach of getting Todo.data, making ics Calendars from each of them and then putting all the todos into one calendar seems like the only feasible way based on the available interfaces.

The VTodo class of the library VObject apparently has an even more complete set of explicitly interfaced attributes, but no documentation on this class found. Probably it works likes this:

vtodo.add('summary').value = "Some question"  # Untested!

As VObject was last updated 2018, perhaps not the best choice anyway though (compared to ics updated last week, python-caldav yesterday).

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

No branches or pull requests

1 participant