greatday.todo module

Contains greatday’s custom Todo types.

class GreatTodo(todo)[source]

Bases: magodo._magic.MagicTodoMixin

Custom MagicTodo type used when working with Todos in the daily file.

Parameters
  • self (TypeVar(M, bound= MagicTodoMixin)) –

  • todo (Todo) –

classmethod from_line(line)[source]

Override’s default implementation in order to add caching.

Parameters

line (str) –

Return type

Union[Ok[GreatTodo, ErisError], Err[GreatTodo, ErisError]]

from_line_spells = [<function remove_o_prefix>, <function remove_x_prefix>]
classmethod from_model(mtodo)[source]

Construct a GreatTodo from a Todo model class.

Parameters

mtodo (Todo) –

Return type

GreatTodo

property ident

Returns this Todo’s unique identifier.

Return type

str

post_todo_spells = [<function remove_priorities>, <function group_tags>]
pre_todo_spells = [<function x_points>]
to_line_spells = [<function add_o_prefix>, <function add_x_prefix>]
to_model(session, key=None)[source]

Converts a GreatTodo into something that the DB can work with.

Parameters
  • session (Session) –

  • key (Optional[str]) –

Return type

Todo

todo_spells = [<function snooze_spell>, <function render_relative_dates>, <function due_context_spell>, <function appt_todos>, <function inbox_spell>, <function scope_spell>, <function reopen_todo_spell>]