Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugojosefson/todo-markdown
Use markdown docs, to keep track of todo items.
https://github.com/hugojosefson/todo-markdown
deno markdown todo
Last synced: 29 days ago
JSON representation
Use markdown docs, to keep track of todo items.
- Host: GitHub
- URL: https://github.com/hugojosefson/todo-markdown
- Owner: hugojosefson
- Created: 2023-12-23T13:49:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-24T11:54:04.000Z (5 months ago)
- Last Synced: 2024-09-17T01:21:13.980Z (4 months ago)
- Topics: deno, markdown, todo
- Language: TypeScript
- Homepage:
- Size: 323 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-ast.json
Awesome Lists containing this project
README
{
"type": "root",
"children": [
{
"type": "heading",
"depth": 1,
"children": [
{
"type": "text",
"value": "todo-markdown"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Use markdown docs, to keep track of todo items."
}
]
},
{
"type": "table",
"align": [
null
],
"children": [
{
"type": "tableRow",
"children": [
{
"type": "tableCell",
"children": [
{
"type": "text",
"value": "🚧️👷 Under construction 👷🚧️"
}
]
}
]
}
]
},
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "Ex"
},
{
"type": "emphasis",
"children": [
{
"type": "text",
"value": "amp"
}
]
},
{
"type": "text",
"value": "le"
}
]
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Markdown input"
}
]
},
{
"type": "code",
"lang": "markdown",
"meta": null,
"value": "# My TODO:s\n\n## Urgent\n\n- [x] TODO-2 Pay bills\n- [ ] TODO-1 Buy milk\n- [x] TODO-3 Call mom\n- [ ] TODO-5 Buy eggs\n\n## [ ] Later\n\n- [ ] TODO-? Buy bread\n- [ ] TODO-7 Eat it all\n\n## TODO-? Other\n\n- [ ] TODO-xx Do something else\n- [ ] Do something even elser\n\n## [ ] TODO-? Heading with box and placeholder\n\n## TODO-10 Heading with task identifier, but no box"
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Markdown output"
}
]
},
{
"type": "code",
"lang": "markdown",
"meta": null,
"value": "# My TODO:s\n\n## Urgent\n\n- [x] TODO-2 Pay bills\n- [ ] TODO-1 Buy milk\n- [x] TODO-3 Call mom\n- [ ] TODO-5 Buy eggs\n\n## [ ] TODO-11 Later\n\n- [ ] TODO-12 Buy bread\n- [ ] TODO-7 Eat it all\n\n## [ ] TODO-13 Other\n\n- [ ] TODO-14 Do something else\n- [ ] TODO-15 Do something even elser\n\n## [ ] TODO-16 Heading with box and placeholder\n\n## [ ] TODO-10 Heading with task identifier, but no box"
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "List of things, that are not tasks"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This is a normal list item, not a task."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This is another."
}
]
}
]
}
]
},
{
"type": "list",
"ordered": true,
"start": 1,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This is a normal ordered list item, not a task."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This is another."
}
]
}
]
}
]
},
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "[ ] Features included"
}
]
},
{
"type": "list",
"ordered": true,
"start": 1,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Parses markdown input."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Finds all places where task identifiers are used:"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "unordered lists / task lists"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ordered lists"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "headings"
}
]
}
]
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "In each eligible place, identifies task identifiers based on regex, ex\n"
},
{
"type": "inlineCode",
"value": "/\\bTODO-\\d+\\b/"
},
{
"type": "text",
"value": "."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "In the existing tasks, finds the highest numbered identifier."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calculates the next identifier, always higher than the highest existing.\nIt's OK to skip numbers."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Identifies all text nodes with new todo items, by:"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "- [ ]"
},
{
"type": "text",
"value": " syntax without a task identifier,"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "# [ ]"
},
{
"type": "text",
"value": " syntax without a task identifier,"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "task identifier placeholder, via regex, ex\n"
},
{
"type": "inlineCode",
"value": "\\bTODO-(\\?+|x+|X+|n+|N+)\\b"
},
{
"type": "text",
"value": ","
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "delete",
"children": [
{
"type": "text",
"value": "copied, already existing task identifier."
}
]
}
]
}
]
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "For each text node with a new task, mutates the node to include the next\nidentifier."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "For each text node with a task identifier, but no box, adds a box."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Processes the markdown from beginning to end, so that new task\nidentifiers are in order."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Removes "
},
{
"type": "inlineCode",
"value": "\\"
},
{
"type": "text",
"value": " before a box and task identifier, if any."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Outputs transformed markdown."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Formats the markdown output."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Supports multiple files, parsing them, and seeing all tasks across all\nfiles at the same time."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Renames each file to its first top-level heading, if any. Excluding the\n"
},
{
"type": "inlineCode",
"value": "#"
},
{
"type": "text",
"value": " character, any box, and sets file extension to "
},
{
"type": "inlineCode",
"value": ".md"
},
{
"type": "text",
"value": "."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "When renaming, if a file with the same name already exists, does any\nrenaming on that file first. If they still collide, concatenates the\ncontents of the two files."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "When renaming, if a file with the same name already exists, and the\ncontents are identical, deletes the file, so that it's not duplicated."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "When renaming, updates links to the renamed file, in all files. Ex\n"
},
{
"type": "inlineCode",
"value": "[Link description](./old-file-name.md)"
},
{
"type": "text",
"value": " →\n"
},
{
"type": "inlineCode",
"value": "[Link description](./new-file-name.md)"
},
{
"type": "text",
"value": "."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "delete",
"children": [
{
"type": "text",
"value": "When updating links to a renamed file, if the link is to a heading, and\nthe heading is renamed, updates the link to point to the new heading."
}
]
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "When updating links to a renamed file, if the link text contains the old\nfile name without file extension, replaces that part of the link text\nwith the new file name without file extension."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "delete",
"children": [
{
"type": "text",
"value": "Writes a table of contents between any comments "
},
{
"type": "inlineCode",
"value": ""
},
{
"type": "text",
"value": " and\n"
},
{
"type": "inlineCode",
"value": ""
},
{
"type": "text",
"value": "."
}
]
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Does not write unchanged files."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Directory can be a task, its data in "
},
{
"type": "inlineCode",
"value": "index.md"
},
{
"type": "text",
"value": "."
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Renames the directory, instead of renaming "
},
{
"type": "inlineCode",
"value": "index.md"
},
{
"type": "text",
"value": "."
}
]
}
]
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Writes a shallow index to pages+dirs/index.md, between any comments\n"
},
{
"type": "inlineCode",
"value": ""
},
{
"type": "text",
"value": " and "
},
{
"type": "inlineCode",
"value": ""
},
{
"type": "text",
"value": "."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": true,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "If non-empty directory has no "
},
{
"type": "inlineCode",
"value": "index.md"
},
{
"type": "text",
"value": ", creates one with a heading\n"
},
{
"type": "inlineCode",
"value": "# ${directoryName}"
},
{
"type": "text",
"value": " and a shallow index."
}
]
}
]
}
]
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Features requiring a task model"
}
]
},
{
"type": "list",
"ordered": true,
"start": 1,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "If all sub-tasks of a task are completed, marks the task as completed."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Finds mentions of tasks, and links to the task's file."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Finds mentions of tasks, and links to the task's file, and the task's\nheading."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Updates link text, if the linked task is renamed."
}
]
}
]
}
]
},
{
"type": "heading",
"depth": 4,
"children": [
{
"type": "text",
"value": "Task defined in a heading"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "listItem"
},
{
"type": "text",
"value": "s are the "
},
{
"type": "inlineCode",
"value": "includes"
},
{
"type": "text",
"value": " of any parent task (heading or "
},
{
"type": "inlineCode",
"value": "listItem"
},
{
"type": "text",
"value": ")."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Interprets and updates task sub-headings:"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "Do ${currentTaskId} after"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "Do ${currentTaskId} before"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "Description"
},
{
"type": "text",
"value": ", or text paragraph immediately following a task heading."
}
]
}
]
}
]
}
]
}
]
},
{
"type": "heading",
"depth": 4,
"children": [
{
"type": "text",
"value": "Task defined in a "
},
{
"type": "inlineCode",
"value": "listItem"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "listItem"
},
{
"type": "text",
"value": "s are the "
},
{
"type": "inlineCode",
"value": "includes"
},
{
"type": "text",
"value": " of any parent task (heading or "
},
{
"type": "inlineCode",
"value": "listItem"
},
{
"type": "text",
"value": ")."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Interprets and updates task sub-"
},
{
"type": "inlineCode",
"value": "listItem[checked=null]"
},
{
"type": "text",
"value": "s"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "Do ${currentTaskId} after"
},
{
"type": "text",
"value": " | "
},
{
"type": "inlineCode",
"value": "Do after"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "otherTaskId1"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "otherTaskId2"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "…"
}
]
}
]
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": false,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "Do ${currentTaskId} before"
},
{
"type": "text",
"value": " | "
},
{
"type": "inlineCode",
"value": "Do before"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "otherTaskId3"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "otherTaskId4"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "…"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "Further details"
}
]
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Task model"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "See "
},
{
"type": "link",
"title": null,
"url": "./src/model/task.ts",
"children": [
{
"type": "text",
"value": "src/model/task.ts"
}
]
},
{
"type": "text",
"value": "."
}
]
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Where to find task identifiers"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "In the Abstract Syntax Tree (AST) of the markdown input, we expect to find task\nidentifiers in the following places:"
}
]
},
{
"type": "code",
"lang": "css",
"meta": null,
"value": "listItem > paragraph text\nheading text"
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "AST from this README"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "For an example of the AST of this entire README, please see\n"
},
{
"type": "link",
"title": null,
"url": "./README-ast.json",
"children": [
{
"type": "text",
"value": "README-ast.json"
}
]
},
{
"type": "text",
"value": "."
}
]
}
]
}