Skip to main content

Module tasks

Module tasks 

Source
Expand description

Tasks: to-dos (VTODO, RFC 5545 §3.6.2) in CalDAV task lists, one per file, with what ties them to the rest (RFC 9253, “iCalendar Relationships”):

  • a step of a bigger task: RELATED-TO;RELTYPE=PARENT:<uid>, in the step;
  • waits for another: RELATED-TO;RELTYPE=DEPENDS-ON:<uid>, in the one that waits, as Sioul writes it. RFC 9253 §4 puts its temporal links in the one that comes first instead (RELATED-TO;RELTYPE=FINISHTOSTART;GAP=P14D:<uid> for “two weeks after”): read too, and written when there is a gap;
  • its notes, mail, drafts, events: LINK (RFC 9253 §8.2): mid: for a message (RFC 2392), sioul: for the rest (links);
  • the people and offices it involves: CONTACT, its ALTREP pointing at their card;
  • its project: REFID (docs/notes-folder.md);
  • how long it takes: ESTIMATED-DURATION (draft-ietf-calext-ical-tasks).

DTSTART says from when a task can start, DUE the date asked from outside. Neither turns into “overdue”: the plan always starts from today (plan, docs/tasks.md).

Tasks are changed line by line (lines): what Sioul does not edit (alarms, another application’s fields) is kept exactly, and a form saved unchanged writes nothing.

Structs§

Changed 🔒
What the form changed, field by field.
ContactRef
Someone a task involves (CONTACT, RFC 5545 §3.8.4.2): a name, and where their card is.
Link
Something a task points at (LINK, RFC 9253 §8.2).
Relation
How a task is tied to another component (RELATED-TO, RFC 9253 §9.1).
Task
One task, as read from its file.
TaskEdit
What the task form gives back, and what a task is as the form shows it.

Enums§

Status
A task’s state (RFC 5545 §3.8.1.11).

Constants§

AT
A time given to a task for one day by a drag in the day view (Task::at), in UTC, as Sioul wrote it before time blocks: read still, never written (a task is pinned to a time by a block, an event every calendar shows, blocks). Not DTSTART: RFC 5545 wants DUE of DTSTART’s value type and after it, and CalDAV servers that check (Sabre: Nextcloud) refuse a task whose start has a time while its date asked is a date, or has passed.
ESTIMATE_FIRST
The first estimate a task was given, written once (Task::estimate_first).
FELT_KEPT
The felt ratings kept in a task’s file: the newest five days.
KINDS
The kinds of task, by what doing them takes: a call, writing, a form or anything done on a website, going out, reading, thinking, making. Tasks of one kind are easier done together.
KIND_CONCEPT
A task’s kind is written as a concept (RFC 9253, CONCEPT), under this tag (RFC 4151): servers and other applications keep it as it is.
OFFICE_CONCEPT
A task that can only be done while offices are open (a call to an office, a counter).
STAMPS 🔒
Lines rewritten at every change (RFC 5545 §3.8.7).

Functions§

add_lines
The main VTODO with added lines, those not there yet; the text as it was when all are.
all
Every task of every list.
apply
The task’s text with the form’s changes: only the lines of what changed are written again; nothing changed, nothing is written.
completed_at
A task done at another time than now (an import of what was done before): its COMPLETED line set to at; the text as it was when it already says so.
contact 🔒
contact_line
CONTACT;ALTREP="<uri>":<name>.
date_line 🔒
A DTSTART or DUE line: a date as a DATE, a time in UTC.
day_of 🔒
default_list
Where a new task goes: a writable list made for tasks, then one that also takes them, then one that does not say.
duration_of
Minutes as an iCalendar duration: 15 → “PT15M”, 90 → “PT1H30M”, 20160 → “P14D”.
energy_of
“LIGHT”, “heavy”, “Rest” → “light”, “heavy”, “rest”; anything else, the usual: “”.
field_lines 🔒
The lines of the fields that changed, as the form has them.
is_kind_id
Whether a word can name a kind: lowercase letters, digits and hyphens, as Sioul’s own kinds and those you add (“errand”, “rendez-vous”).
kind_of_concept 🔒
The kind a concept names, when it is one of Sioul’s.
link_line
LINK;LINKREL=…;LABEL=…;VALUE=URI:<uri>, or VALUE=UID for uid:<uid>.
link_of
A LINK line, read.
lists
The calendars that hold tasks.
master_range 🔒
The main VTODO, BEGIN to END: not a changed occurrence (RECURRENCE-ID).
minutes_of
An iCalendar duration in minutes (RFC 5545 §3.3.6): “PT15M” → 15, “P1DT2H” → 1560, “-P1W” → −10080. None when it is not one.
moment 🔒
A DTSTART or DUE line in your time zone: “2026-10-30” for a date, “2026-10-30T17:00” for a time.
new_path
The file a new task gets in a list.
new_task
A new task, with its own UID.
next_turn 🔒
A repeating task’s dates at their next turn after today, the distance between them kept; one without dates waits one turn from today.
one_line 🔒
A value written as it is (a UID, an address): without line breaks or other control characters, which would end its line and start another (an address decoded from %0D%0A, a key from an imported file).
own_lines 🔒
The positions of the main VTODO’s own lines: not its alarms’.
read
One task from its file; None when the file holds an event.
relation_line
RELATED-TO;RELTYPE=<kind>[;GAP=…]:<uid>.
relation_of
A RELATED-TO line, read.
remove_lines
The main VTODO without the lines drop picks; the text as it was when none is.
repeat_of 🔒
“FREQ=WEEKLY;INTERVAL=2” → “weekly”; a rule without one of the four frequencies → “”.
replace_lines
The main VTODO’s lines that drop takes replaced by added, in one change: the stamps written once.
rewrite 🔒
The task’s text with the main VTODO’s lines that keep refuses dropped and added put in, before its alarms; the stamps written again. Nothing dropped and nothing added: the text as it was.
set_felt
How it went, said after the task on on: that day’s rating replaced (a rating with nothing said takes it away), the newest FELT_KEPT days kept, everything else left as it is.
set_gap
A wait with its gap, written in the task that comes first (text), as RFC 9253 §4 places temporal links: RELATED-TO;RELTYPE=FINISHTOSTART;GAP=P14D:<successor> (“the answer comes within two weeks”; no GAP for 0), any other FINISHTOSTART or NEXT to the same task replaced. sioul tasks import and the window’s form of a wait write it so; the text as it was when it says so already.
set_status
The task marked done, started, open again or dropped. A repeating task done comes back instead, its dates moved to their next turn after today.
split_list 🔒
A comma-separated text list (CATEGORIES), its escaped commas kept inside.
status_lines 🔒
The status lines: STATUS, and COMPLETED with PERCENT-COMPLETE when done.
task_of_text
A task from the text of its file, its dates in zone; None when it holds no task.
utc 🔒
zoned 🔒
A DATE-TIME line in zone: UTC, with its TZID, or floating (taken in zone).