-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Support CalendarItem recurrences #37
Comments
Hi Eric, I am interested in this enhancement. Is there anything that I can do to help, if you have already started on the implementation, are there any commits that I have a look at it to see if I can figure it out? |
Hi @Jayanth1991 I started but have just implemented parts of the necessary XML elements. What is needed is adding a I'll commit my WIP in a branch tonight so you can have a look. Thanks! |
There's now a branch with the WIP: https://github.com/ecederstrand/exchangelib/tree/37_recurrence-support Please post any progress here :-) Maybe it's easiest to start by just parsing recursion info on existing |
How is the work going with this? I can't get recurring items right now and almost all of my appointments are recurring. |
There's a branch with the current state, which is non-functional still. However, if you just need to view your appointments, there's the |
Thank you, that method worked perfectly for my purpose :) |
Am I just missing the function for accepting Calendar invitations or would that be on a separate branch? I love this repo, by the way. Thank you. |
Meeting invitations are only barely supported, meaning that |
I'm happy to have a go at it. |
Cool. I opened #89 to track this, as it doesn't really have anything to do with calendar recurrences. |
There's now rudimentary support for reading recurring item info in the 37_recurrence-support branch TODO: tests, write support, a simple API for creating recurrences, and docs |
We should now have full read-write recurrence support. There's support for creating daily, weekly, monthly and yearly recurrences (the latter two in relative and absolute versions). Everything is implemented in https://github.com/ecederstrand/exchangelib/blob/master/exchangelib/recurrence.py Here's an example of creating 7 occurrences on Mondays and Wednesdays of every third week, starting September 1, 2017: from exchangelib import CalendarItem, EWSDateTime, EWSTimeZone, EWSDate
from exchangelib.recurrence import Recurrence, WeeklyPattern, MONDAY, WEDNESDAY
item = CalendarItem(
folder=a.calendar,
start=tz.localize(EWSDateTime(2017, 9, 1, 11)),
end=tz.localize(EWSDateTime(2017, 9, 1, 13)),
subject='Hello Recurrence',
recurrence=Recurrence(
pattern=WeeklyPattern(interval=3, weekdays=[MONDAY, WEDNESDAY]),
start=EWSDate(2017, 9, 1),
number=7
),
)
# Occurrence data for the master item
for i in a.calendar.filter(start__lt=end, end__gt=start):
print(i.subject, i.start, i.end)
print(i.recurrence)
print(i.first_occurrence)
print(i.last_occurrence)
for o in i.modified_occurrences:
print(o)
for o in i.deleted_occurrences:
print(o)
# All occurrences expanded
for i in a.calendar.view(start=end, end=start):
print(i.subject, i.start, i.end) This is to be considered an experimental feature for now. Please play around with it and see if it does what you want. I'd like this to settle a bit before setting the API and functionality in stone in a release. Thanks. |
Tests added in 99b5770 I now consider this ready for general consumption. |
exchangelib
doesn't yet support getting, setting or changing recurrence info on recurring calendar items.Short introduction with examples: https://msdn.microsoft.com/en-us/library/office/dn727654(v=exchg.150).aspx
Reference: https://msdn.microsoft.com/en-us/library/office/aa580471(v=exchg.150).aspx
The text was updated successfully, but these errors were encountered: