Skip to content

Commit

Permalink
Improve documentation for some higher level APIs and Todo overview (#292
Browse files Browse the repository at this point in the history
)
  • Loading branch information
allenporter authored Feb 8, 2024
1 parent 502b9e3 commit 3564117
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
12 changes: 11 additions & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ each recurring event. A merged iterator peeks into the input of each
iterator to decide which one to pull from when determinig the next item
in the iterator.

An individual instance of a recurring event is generated with the same `UID`,
but with a different `RECURRENCE_ID` based on the start time of that instance.

### Recurrence Editing

WIP
An entire series may be modified by modifying the original event without
referencing a `RECURRENCE_ID`. A `RECURRENCE_ID` can refer to a specific
instance in the series, or with `THIS_AND_FUTURE` to apply to forward looking
events.

When modifying an instance, a new copy of the event is created for that instance
and the original event representing the whole series is modified to exclude
the edited instance.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ with filename.open() as ics_file:
ics_file.write(IcsCalendarStream.calendar_to_ics(calendar))
```

# Application-level APIs

The above APIs are used for lower level interaction with calendar components,
however applications require a higher level interface to manage some of the
underlying complexity. The `ical.store` library is used to manage state at a higher
level (e.g. ensuring timezones are created properly) or handling edits to
recurring events.

# Recurring events

A calendar event may be recurring (e.g. weekly, monthly, etc). Recurring events
Expand Down
10 changes: 9 additions & 1 deletion ical/todo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
"""A grouping of component properties that describe a to-do."""
"""A grouping of component properties that describe a to-do.
A todo component can represent an item of work assigned to an individual
such as "turn in a travel expense today".
A todo component without a start date or due date (or duration) specifies
a to-do that will be associated with each successive calendar date until it
is completed.
"""

from __future__ import annotations

Expand Down

0 comments on commit 3564117

Please sign in to comment.