Todoist Actual Backup ({{ date }})

{% macro render_task(task, level=0) %}
{{ task.content | markdown | safe }}
{% if task.description %}
{{ task.description | markdown | safe }}
{% endif %} {% set meta_fields = [] %} {% if task.id is not none %} {% set _ = meta_fields.append('ID: ' ~ task.id) %} {% endif %} {% if task.due and task.due.date %} {% set due_dt = task.due.date %} {% if due_dt.__class__.__name__ == 'datetime' or due_dt.__class__.__name__ == 'date' %} {% set due_fmt = due_dt.strftime('%Y-%m-%d') %} {% else %} {% set due_str = due_dt|string %} {% if 'T' in due_str %} {% set due_fmt = due_str[:10] %} {% else %} {% set due_fmt = due_str %} {% endif %} {% endif %} {% set _ = meta_fields.append('Due: ' ~ due_fmt) %} {% endif %} {% if task.due and task.due.is_recurring %} {% if task.due.string %} {% set _ = meta_fields.append('Recurring: ' ~ task.due.string) %} {% endif %} {% endif %} {% if task.priority is not none %} {% set _ = meta_fields.append('Priority: ' ~ task.priority) %} {% endif %} {{ meta_fields|join(' | ') }}
{% if task.attachments %}
Attachments:
{% endif %} {% if task.comments %}
Comments:
{% endif %} {% if task.subtasks %}
{% for child in task.subtasks %} {{ render_task(child, level + 1) }} {% endfor %}
{% endif %}
{% endmacro %} {% for project in projects %}

{{ project.name }} {% if project.is_archived %}[Archived]{% endif %}

ID: {{ project.id }} | Color: {{ project.color }} | Created: {{ project.created_at }}

Active Tasks

{% for task in project.tasks %} {{ render_task(task, 0) }} {% else %}

No active tasks.

{% endfor %}

Completed Tasks

{% for task in project.completed_tasks %}
{{ task.content | markdown | safe }}
{% if task.description %}
{{ task.description | markdown | safe }}
{% endif %} {% set meta_fields = [] %} {% if task.id is not none %} {% set _ = meta_fields.append('ID: ' ~ task.id) %} {% endif %} {% if task.due and task.due.date %} {% set due_dt = task.due.date %} {% if due_dt.__class__.__name__ == 'datetime' or due_dt.__class__.__name__ == 'date' %} {% set due_fmt = due_dt.strftime('%Y-%m-%d') %} {% else %} {% set due_str = due_dt|string %} {% if 'T' in due_str %} {% set due_fmt = due_str[:10] %} {% else %} {% set due_fmt = due_str %} {% endif %} {% endif %} {% set _ = meta_fields.append('Due: ' ~ due_fmt) %} {% endif %} {% if task.due and task.due.is_recurring %} {% if task.due.string %} {% set _ = meta_fields.append('Recurring: ' ~ task.due.string) %} {% endif %} {% endif %} {% if task.priority is not none %} {% set _ = meta_fields.append('Priority: ' ~ task.priority) %} {% endif %} {% if task.completed_at %} {% if task.completed_at.__class__.__name__ == 'datetime' or task.completed_at.__class__.__name__ == 'date' %} {% set completed_fmt = task.completed_at.strftime('%Y-%m-%d') %} {% else %} {% set completed_str = task.completed_at|string %} {% if 'T' in completed_str %} {% set completed_fmt = completed_str[:10] %} {% else %} {% set completed_fmt = completed_str %} {% endif %} {% endif %} {% set _ = meta_fields.append('Completed: ' ~ completed_fmt) %} {% endif %} {{ meta_fields|join(' | ') }}
{% if task.parent_task %}
Parent task: {{ task.parent_task.content | markdown | safe }}
{% endif %} {% if task.attachments %}
Attachments:
{% endif %} {% if task.comments %}
Comments:
{% endif %}
{% else %}

No completed tasks in this period.

{% endfor %}
{% endfor %}