660 lines · 14.9 KB · JSONRaw
{ "format_version": 1, "id": "todo", "name": "Todo", "plural": "Todos", "record_route": "/todos/todo/[id]", "picture": { "photo": "photo:a86576668bb7f4915eae3b9dd6f2e3b9cbd20b9e55f85fc7c12586b759858b0e", "object": "tool-todos" }, "builtin": true, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "todo" } } ], "deletion": { "bin": true }, "engine": "todos", "projects_read": { "kind": "todo", "read": "todo", "families": [ "todos", "projects" ] }, "role": "todo", "filing_rank": 1, "made_by_verb": true, "record_kind": "todo", "views": [ { "face": "today", "name": "Today", "sizes": [ "medium", "large" ] }, { "face": "upcoming", "name": "Upcoming", "sizes": [ "medium", "large" ] }, { "face": "todayEverywhere", "name": "Today", "sizes": [ "medium", "large" ], "everywhere": true } ], "columns": [ { "key": "title", "type": "text", "required": true, "placeholder": "What needs doing?", "name": "Title" }, { "key": "notes", "name": "Details", "type": "longtext" }, { "key": "status", "type": "choice", "choices": [ "open", "done", "dropped", "missed" ], "name": "Status", "labels": { "open": "Open", "done": "Done", "dropped": "Dropped", "missed": "Missed" }}, { "key": "due_at", "name": "Due", "type": "date" }, { "key": "repeats", "name": "Repeats", "type": "text", "readonly": true, "placeholder": "Once", "opens": { "column": "recurrence_id", "table": "todo_recurrence" }, "format": "repeat-rule", "labels": { "none": "Once", "daily": "Daily", "weekdays": "Every weekday", "weekly": "Weekly", "biweekly": "Every two weeks", "monthly": "Monthly", "yearly": "Yearly", "custom": "Custom repeat", "paused_daily": "Daily, paused", "paused_weekdays": "Every weekday, paused", "paused_weekly": "Weekly, paused", "paused_biweekly": "Every two weeks, paused", "paused_monthly": "Monthly, paused", "paused_yearly": "Yearly, paused", "paused_custom": "Custom repeat, paused"}}, { "key": "done_before", "name": "Done before", "type": "number", "readonly": true, "units": { "one": "done once before", "other": "done {n} times before", "zero": "" } }, { "key": "snoozed_until", "name": "Snoozed until", "type": "date", "fact": true, "reading": "Snoozed until {value}", "format": "calendar-datetime"}, { "key": "priority", "type": "number", "name": "Priority" }, { "key": "completed_at", "name": "Completed", "type": "date", "readonly": true }, { "key": "project", "name": "Project", "type": "link", "link_to": "project" }, { "key": "people", "edges": true, "name": "People", "type": "link", "link_to": "person", "multiple": true, "readonly": true }, { "key": "recurrence_id", "name": "Repeat rule", "type": "link", "link_to": "todo_recurrence", "readonly": true, "contributes": false }, { "key": "source_inbox_id", "name": "Capture", "type": "link", "link_to": "thought", "readonly": true } ], "title": "title", "date": "due_at", "project": "project", "order": null, "slip": { "title": "title", "subtitle": null, "trailing": "due_at", "photo": null, "toggle": "status", "badge": { "column": "recurrence_id", "symbol": "repeat", "spoken": "Repeats" }, "byline": { "column": "priority", "words": { "1": "high priority", "2": "high priority", "3": "high priority" } } }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "title", "due_at", "repeats", "snoozed_until", "completed_at", "project", "people", "source_inbox_id" ] }, { "heading": "Details", "columns": [ "notes" ] }, { "heading": null, "columns": [], "when": { "column": "status", "values": [ "dropped" ] }, "note": "Dropped" } ], "group": { "column": "status", "sections": [ { "heading": null, "values": [ "open" ], "closed": false }, { "heading": "Done", "values": [ "done" ], "closed": false }, { "heading": "Dropped", "values": [ "dropped" ], "closed": false }, { "heading": "Missed", "values": [ "missed" ], "closed": false } ] }, "commands": [ { "id": "done", "label": "Mark done", "kind": "update", "verb": "update_todo", "data": { "status": "done" }, "bindings": { "id": "$id" }, "when": { "status": "open" }, "receipt": "Done", "undo": "reopen", "does": "completes" }, { "id": "reopen", "label": "Reopen", "object": "restore", "kind": "update", "verb": "update_todo", "data": { "status": "open" }, "bindings": { "id": "$id" }, "when": { "status": "done" }, "receipt": "Reopened", "undo": "done" }, { "id": "drop", "label": "Drop", "kind": "update", "verb": "update_todo", "data": { "status": "dropped" }, "bindings": { "id": "$id" }, "when": { "status": "open" }, "receipt": "Dropped", "does": "puts-away", "undo": "take_up" }, { "id": "take_up", "label": "Reopen", "object": "restore", "kind": "update", "verb": "update_todo", "data": { "status": "open" }, "bindings": { "id": "$id" }, "when": { "status": "dropped" }, "receipt": "Reopened", "undo": "drop" }, { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "todo" }, "bindings": { "id": "$id" }, "confirm": "Undo on the receipt brings it back.", "receipt": "Deleted", "does": "destroys" }, { "id": "open-people", "label": "Open people", "kind": "open", "opens": "people" }, { "id": "open-repeat-rule", "label": "Open repeat rule", "kind": "open", "opens": "recurrence_id" }], "upcoming": { "dates": [ "due_at", "snoozed_until" ], "undated": "No date", "late": "Late", "later": "Later", "series": "recurrence_id" }, "empty": {"title": "No todos yet"}, "create": { "label": "New todo", "dated": "due_at" }, "instructions": "A todo is one thing to do. Status is open until it is done, or dropped when it will not be done; an earlier occurrence of a repeating todo still open when a later one is done becomes missed, never done. the due date is when it is wanted, and a snoozed todo stays out of sight until its snooze ends. A priority of 1 or more marks it as high priority. Never invent a due date the person did not give.", "groups": { "stack": "slips", "widget": { "face": "slips", "sizes": [ "medium", "large" ] } }, "parts": { "shape": "sheet", "head": { "facts": [ "snoozed_until" ], "state": "status" }, "links": [ "people", "project" ], "lists": [], "acts": { "main": "done", "more": [ "reopen", "drop", "take_up", "open-people", "open-repeat-rule" ], "away": "delete" }, "cards": [ { "column": "priority", "object": "flag" }, { "column": "due_at" }, { "column": "notes", "row": true } ], "strip": [], "body": "notes"}, "tool": { "name": "Todos", "key": "todos", "card_stock": "sage", "icon": "circle-check", "route": "/todos", "figures": [ { "read": "openTodos", "many": "{n} open" } ] ,"purpose":"What you need to do and when it is due."}, "tables": [ { "name": "cotton_todos", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "title", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n title TEXT NOT NULL", "position": 1 }, { "name": "notes", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n notes TEXT", "position": 2 }, { "name": "label", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n label TEXT", "position": 3 }, { "name": "status", "type": "TEXT", "default": "'open'", "nullable": false, "primary_key": false, "declaration": "\n status TEXT NOT NULL DEFAULT 'open'", "position": 4 }, { "name": "due_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n due_at TEXT", "position": 5 }, { "name": "snoozed_until", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n snoozed_until TEXT", "position": 6 }, { "name": "priority", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n priority INTEGER NOT NULL DEFAULT 0", "position": 7 }, { "name": "completed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n completed_at TEXT", "position": 8 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 9 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 10 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 11 }, { "name": "recurrence_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n recurrence_id TEXT", "position": 12 }, { "name": "occurrence_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n occurrence_at TEXT", "position": 13 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 14 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 15 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 16 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 17 } ], "constraints": [ { "declaration": "\n UNIQUE (recurrence_id, occurrence_at)", "position": 18 }, { "declaration": "\n CHECK (status IN ('open', 'done', 'dropped', 'missed'))", "position": 19 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n ", "position": 20 } ], "prefix": "CREATE TABLE cotton_todos (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_todos_recurrence ON cotton_todos (recurrence_id) WHERE recurrence_id IS NOT NULL", "CREATE INDEX idx_cotton_todos_workspace ON cotton_todos (workspace_id)", "CREATE INDEX idx_cotton_todos_workspace_due ON cotton_todos (workspace_id, due_at)", "CREATE INDEX IF NOT EXISTS idx_cotton_todos_author ON cotton_todos (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_todos USING fts5(\n title, notes, content = 'cotton_todos', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_todos_ai AFTER INSERT ON cotton_todos WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_todos'), 0) BEGIN\n INSERT INTO fts_todos (rowid, title, notes) VALUES (new.rowid, new.title, new.notes);\n END", "CREATE TRIGGER fts_todos_ad AFTER DELETE ON cotton_todos WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_todos'), 0) BEGIN\n INSERT INTO fts_todos (fts_todos, rowid, title, notes) VALUES ('delete', old.rowid, old.title, old.notes);\n END", "CREATE TRIGGER fts_todos_au AFTER UPDATE OF title, notes ON cotton_todos\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_todos'), 0) AND (new.title IS NOT old.title OR new.notes IS NOT old.notes) BEGIN\n INSERT INTO fts_todos (fts_todos, rowid, title, notes) VALUES ('delete', old.rowid, old.title, old.notes);\n INSERT INTO fts_todos (rowid, title, notes) VALUES (new.rowid, new.title, new.notes);\n END" ] } ]}