I was looking into how to specify a timezone across a whole yaml file, and (after doing some manual work) I saw that ics can do it for us. But, that is the unreleased 0.8 version. I decided to give it a try, and found... it's different and this tool will require updates.
- Field
name → summary
- Date parsing has changed, and now is more reliant on YAML data processing (the YAML processor itself should return a datetime object, or certain other things that can be converted to it: https://github.com/ics-py/ics-py/blob/81b77a2d1e919d87367f97ddafdb1a488a8d2986/src/ics/utils.py#L29-L41
The practical effect is there should be an extra space in the format: YYYY-MM-DD HH:MM:SS -ZZ:00 (ZZ:00 is optional, space before it is mandatory, seconds is mandatory)
str(calendar) doesn't work anymore, calendar.serialize() instead it seems. Same for events.
event_ics_from_yaml can't return a string anymore - it produces an error later when it tries to serialize. So, the manual insertion of RRULE need some updating
- dtstamp can be set directly via
event.dtstamp
- rrule can be set via
event.extra.append(rrule_rrule)
I will update the issue description with anything else I find.
I didn't exactly mean to try to fix these, but went a bit deep and didn't stop until figured them out. My upcoming PR doesn't yet make all tests pass - I am not sure which tests are too strict, for example.
I'm not sure what to do: do nothing, wait for 0.8.0 to be released (and either do nothing or use my older manual file-timezone handling method). Or, use the development version of ics (pip install https://github.com/ics-py/ics-py/archive/refs/heads/main.zip) to continue moving forward.
And since I haven't been master planning the project, I am not sure if I am the best one to try to fix things up (I have no special experience in icalendar files, I just would like something working sooner rather than later...)
I was looking into how to specify a timezone across a whole yaml file, and (after doing some manual work) I saw that
icscan do it for us. But, that is the unreleased 0.8 version. I decided to give it a try, and found... it's different and this tool will require updates.name→summaryThe practical effect is there should be an extra space in the format:
YYYY-MM-DD HH:MM:SS -ZZ:00(ZZ:00 is optional, space before it is mandatory, seconds is mandatory)str(calendar)doesn't work anymore,calendar.serialize()instead it seems. Same for events.event_ics_from_yamlcan't return a string anymore - it produces an error later when it tries to serialize. So, the manual insertion of RRULE need some updatingevent.dtstampevent.extra.append(rrule_rrule)I will update the issue description with anything else I find.
I didn't exactly mean to try to fix these, but went a bit deep and didn't stop until figured them out. My upcoming PR doesn't yet make all tests pass - I am not sure which tests are too strict, for example.
I'm not sure what to do: do nothing, wait for 0.8.0 to be released (and either do nothing or use my older manual file-timezone handling method). Or, use the development version of ics (
pip install https://github.com/ics-py/ics-py/archive/refs/heads/main.zip) to continue moving forward.And since I haven't been master planning the project, I am not sure if I am the best one to try to fix things up (I have no special experience in icalendar files, I just would like something working sooner rather than later...)