Skip to content

Instantly share code, notes, and snippets.

@phdd
Last active April 23, 2020 07:16
Show Gist options
  • Save phdd/8971f8599f175deaf4dd604a381b5773 to your computer and use it in GitHub Desktop.
Save phdd/8971f8599f175deaf4dd604a381b5773 to your computer and use it in GitHub Desktop.
From planner-todo.web.app to todo.txt
select (case i.checked when 1 then 'x ' else '' end) || i.content
|| (case i.note when '' then '' else '\n' || replace(i.note, '
', '\n') end) || ' +' || replace(p.name, ' ', '')
|| (case when i.due_date != '' then ' due:' || substr(i.due_date, 0, 11) else '' end)
from Items as i
join Projects as p on i.project_id = p.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment