Liking cljdoc? Tell your friends :D

dgknght.tasks.vtodo

Convert between task maps (the :dgknght.tasks/task spec) and iCalendar VTODO components.

The overridden occurrences of a recurring task (VTODOs with its UID and a RECURRENCE-ID) become its :overrides.

A RELATED-TO naming the task's parent (RELTYPE=PARENT, the default) becomes its :parent, unless there's more than one or it has other parameters. Other relationships stay in :extra-properties.

Properties and subcomponents (e.g. VALARM) that aren't modeled are kept as iCalendar text under :extra-properties and :extra-components, as is a recurrence rule with parts the rule map doesn't model and an RDATE of periods. Other VTODOs in the calendar, such as an override of this and future occurrences (RANGE=THISANDFUTURE), are kept under :extra-vtodos. Time zone definitions any of these need that can't be regenerated from the time zone database are kept under :extra-timezones. Serializing writes them back, so a parse/serialize round trip doesn't drop data written by other clients.

Convert between task maps (the `:dgknght.tasks/task` spec) and iCalendar
VTODO components.

The overridden occurrences of a recurring task (VTODOs with its UID and a
RECURRENCE-ID) become its `:overrides`.

A RELATED-TO naming the task's parent (RELTYPE=PARENT, the default) becomes
its `:parent`, unless there's more than one or it has other parameters.
Other relationships stay in `:extra-properties`.

Properties and subcomponents (e.g. VALARM) that aren't modeled are kept as
iCalendar text under `:extra-properties` and `:extra-components`, as is a
recurrence rule with parts the rule map doesn't model and an RDATE of
periods. Other VTODOs in the calendar, such as an override of this and
future occurrences (RANGE=THISANDFUTURE), are kept under `:extra-vtodos`.
Time zone
definitions any of these need that can't be regenerated from the time zone
database are kept under `:extra-timezones`. Serializing writes them back, so
a parse/serialize round trip doesn't drop data written by other clients.
raw docstring

ensure-uidclj

(ensure-uid task)

Returns the task with a newly generated :uid if it doesn't have one.

Returns the task with a newly generated :uid if it doesn't have one.
raw docstring

parseclj

(parse s)

Parses a VCALENDAR string and returns the task it contains, or nil if it has no VTODO. When there are several VTODOs, as with a recurring task that has overridden occurrences, the task is the one without a RECURRENCE-ID, and the others are its :overrides.

Parses a VCALENDAR string and returns the task it contains, or nil if it
has no VTODO. When there are several VTODOs, as with a recurring task that
has overridden occurrences, the task is the one without a RECURRENCE-ID,
and the others are its :overrides.
raw docstring

serializeclj

(serialize task)

Returns a VCALENDAR string containing the task as a VTODO, generating a :uid if the task doesn't have one. Throws an ex-info whose data includes the spec's :explain data if the task isn't a valid :dgknght.tasks/task.

Returns a VCALENDAR string containing the task as a VTODO, generating a
:uid if the task doesn't have one. Throws an ex-info whose data includes the
spec's :explain data if the task isn't a valid :dgknght.tasks/task.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close