API Reference
Parser functions
Exceptions
- exception stage_left.ParseError
Data Types
- class stage_left.types.State(value)
State of an Item
- OPEN = ' '
- CHECKED = 'x'
- ONGOING = '@'
- OBSOLETE = '~'
- IN_QUESTION = '?'
- class stage_left.types.Tag(value='', key=None)
An annotation for categorising or filtering the data
-
value:
str
= ''
-
key:
Optional
[str
] = None
-
value:
- class stage_left.types.Item(state, description, tags=<factory>, priority=0, due_date=None)
An entry in a checklist or todo list
-
description:
str
Meaning of the Item. The
Item.description
property stores the raw item text, but formatting options are available viaItem.format_description()
.
-
priority:
int
= 0 Int represation of the Item importance
-
due_date:
Optional
[date
] = None Date object representing the item due date. Due dates specified using the numbered week syntax e.g: 2022-W01 are parsed assuming Monday is the first day of the week. All days in a new year preceding the first Monday are considered to be in week 0 (W00).
- format_description(*, normalize_whitespace=False, with_priority=True, with_tags=True, with_due_date=True)
Output a formatted version of the item description.
- Parameters:
normalize_whitespace (
bool
) – Remove duplicate whitespace from the output item descriptionwith_priority (
bool
) – Include priority in the output item descriptionwith_tags (
bool
) – Include tags in the output item descriptionwith_due_date (
bool
) – Include due date in the output item description
- Return type:
str
-
description: