Parse markdown string.
store = taskmark.loads(markdown)
store = taskmark.loads(markdown, minutes_per_day=360)| Attribute | Value |
|---|---|
| Input | str (markdown) |
| Output | TaskStore |
| Config | minutes_per_day=480 |
Postconditions:
- All valid tasks extracted
- Warnings collected for invalid syntax
- Inheritance resolved
- Subtasks sorted by priority
Parse file, following [text](file.md) links.
store = taskmark.load(path)
store = taskmark.load(path, minutes_per_day=360)| Attribute | Value |
|---|---|
| Input | Path, str, or file object |
| Output | TaskStore |
| Config | minutes_per_day=480 |
Postconditions:
fileandlineset on each task- All linked files parsed
- Circular links warned
- Missing links warned
Errors:
FileNotFoundErrorif file missing
Raise if warnings exist.
store.check() # raises ParseError if warningsUpdate single task in-memory.
result = taskmark.update(store, title, project, changes)| Attribute | Value |
|---|---|
| Input | TaskStore, title, project, TaskChanges |
| Output | UpdateResult |
Task lookup:
- Match by exact
title - Match by
project_path(orNonefor no project) - FAIL if no match or multiple matches
UpdateResult.status:
SUCCESS- All changes appliedPARTIAL- Some changes rejected (seerejected)FAIL- Task not found or ambiguous (seeerror)
Update multiple tasks.
result = taskmark.batch_update(store, updates)| Attribute | Value |
|---|---|
| Input | TaskStore, list[TaskUpdateSpec] |
| Output | BatchUpdateResult |
Behavior:
- Each update independent
- Partial success allowed
- Returns results for each update
Write pending changes to files.
result = taskmark.write_updates(store)| Attribute | Value |
|---|---|
| Input | TaskStore with changes |
| Output | WriteResult |
Behavior:
- Process files independently
- Tasks ordered bottom-up (avoid line drift)
- Atomic writes (temp file + rename)
| From | To | Behavior |
|---|---|---|
| any | done |
Set done_date to today |
done |
other | Clear done_date |
| any | blocked |
Set paused_date to today |
blocked |
open |
Clear paused_date |
recurring + done |
- | Clone task, advance planned_date |
| any | cancelled |
Remove recurrence |
When a recurring task is marked done:
- Original task is marked done (with
done_date) recurrencefield is removed from completed task- New task is created with:
- State:
open planned_date: next occurrence calculated from patternrecurrence: pattern preserved- Inherited metadata: from headings (not explicit task metadata)
- State:
| Pattern Type | Strategy |
|---|---|
Simple (daily, weekly) |
Add 1 unit to base date |
Multiplied (2weeks, 3d) |
Add N units to base date |
Day of month (15th, 31st) |
Next occurrence, clamped to month end |
Nth weekday (2nd-tuesday) |
Next Nth weekday (may skip months) |
| Natural language | Parsed via recurrent library |
Base date priority:
planned_date(if set)due_date(if set)- Today's date
| Condition | Action |
|---|---|
| Invalid date | Warn, skip field |
| Invalid duration | Warn, skip field |
| Malformed key:value | Warn, skip field |
| List item without checkbox | Warn |
| Circular file link | Warn, skip |
| Missing linked file | Warn, continue |
| Non-UTF-8 file | Raise ParseError |
| Missing file | Raise FileNotFoundError |