Add priority, due date and rrule to Event class #168
Add priority, due date and rrule to Event class #168btrevizan wants to merge 22 commits intoics-py:mainfrom
Conversation
|
Is there a change that this PR will be merged? |
|
Hey! As already said in a few places (see here or here), I'm currently working on the next version of ics.py and RRULEs are something I'd love to finally have proper support for. So, first of all, a big thank you for your contribution! Especially interpreting the rule and generating the next occurrences was probably a lot of work. The only thing I'm wondering about is whether we could build upon the rrule functionality of dateutil (which is already a dependency of ics.py) to reduce complexity a little on our side. I didn't read into the details of RRULEs yet, so it would be great to hear your opinion in this case! |
|
Hey. Thank you! The rrule functionality of dateutil has already all the functions needed. I can't imagine a scenario where you will need more than what it is already implemented, but nonetheless if you need to implement helper functions it wouldn't be too much work. I encourage the use of dateutil for rrules. |
|
I could use |
| int: hash of self. Based on self.uid.""" | ||
| return int(''.join(map(lambda x: '%.3d' % ord(x), self.uid))) | ||
|
|
||
| def is_included(self, start, stop): |
| bymonth=[]): | ||
| """Instantiate a new Repeatable rule. | ||
|
|
||
| :param freq: str |
There was a problem hiding this comment.
Could we use a datetime.timedelta to derive the frequency, rather than a hardcoded string? E.g. timedelta(weeks=1) rather than "WEEKLY"
There was a problem hiding this comment.
The timedelta could be serialized later into an RFC compatible frequency
|
Looks like this will also need to be updated to replace |
|
Hey, PR #249 adds PR #249 still needs some polish, but we should be able to merge that soonish. After that, the only thing that is in the way of a v0.8 alpha release is probably some possibility to tune down the parser strictness, as the new parser implementation (which was focussed on also being able to validate files) sometimes seems to nit-picky to handle practically real-world data with it. |
|
Anything we can do to help to add rrule support? I'd very much appreciate this |
|
Support for parsing
As far as I'm aware, this PR only tackled the last point while ignoring modified instances. So copying the respective changes over might be helpful, but there still is a lot of work to do here, but maybe we can reuse parts of the recurring-ical-events project (depending on the extent of this, we might need to be aware that this pulls in LGPLv3 code, but that should be fixable), and their testsuite should also be very useful. So maybe try looking at what RFC 5545 officially mandates, how recurring-ical-events solved that and what other Calendaring solutions do, and try to come up with an API that tackles the 3 points listed above. |
|
I'm doing a bit of cleanup. This PR seems stale and not ready to be merged so i'll close it but if somebody wants to work on it again, feel free to reopen ! |
rrule is totally functional and is recognise by Timeline methods.
Priority and due date could be useful for some applications. The existence of such properties doesn't affect the package, since it is ignored by the parser if "PRIORITY" and "DTDUE" are not specified in .ics or.ical files.