Enhancing icalendar through attributes #662
niccokunzmann
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The icalendar standard has clarity about which attributes can be expected in components.
Attribtues can
They can also
Several issues exist that hint at a better API that we can provide.
(P1) Proposal for (S1) mandatory properties
The
UID
attribute of VEVENT is an example of this.It is mandatory and also occurs once.
Add mandatory attributes to the constructor as well as a
make_valid=True
argument.In case that argument is set, mandatory attributes receive a valid value.
We need
make_valid=False
in order to create the componentsfrom_ical()
Proposal for S1 & S2 - accessing properties
Attributes that are defined in the standard can be added as properties in Pythonic form.
The setter allows setting values that are supported as argument to the wrapping icalendar property.
(P2) Proposal for S3 & S1 - properties that occur once
When attributes can occur only once, we can set them and access them in that way.
See above for the
dtstart
example.(P3) Proposal for S3 & S2 - properties that occur several times
An attribute that can occur once at most and is optional, should look like this:
(P3) Proposal for S4 - attributes occur more than once
Issues: #224
It creates edge cases that are rarely caught if we allow attributes to be
Proposal to access those attributes all as a list:
Here, it can be confusing if one beliefs that this can be modified.
The project ObservableList handles this use-case by creating a list that
can be observed for changes. These can be then copied into the component.
Requirements
I would like the following to happen:
Related
Discussion
I wonder what you think about this, especially:
Beta Was this translation helpful? Give feedback.
All reactions