|
| 1 | +# Format Compatibility |
| 2 | + |
| 3 | +Conversion rules between TaskMark and other task formats. See [specification.md](../specification.md) for the core spec. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## todo.txt Conversion |
| 8 | + |
| 9 | +| Element | todo.txt | TaskMark | Conversion Rule | |
| 10 | +|---------|----------|---------|----------------| |
| 11 | +| Priority | `(A)` at start | `(A)` after state | Move after `- [ ]` | |
| 12 | +| Contexts | `@context` | `#context` | Replace `@` with `#` | |
| 13 | +| Projects | `+project` | `+project` | No change | |
| 14 | +| Assignees | Not supported | `@user` | Add if needed | |
| 15 | +| Dates | Creation date required | Optional | Remove if unwanted | |
| 16 | +| Sections | Not supported | `## Section` | Group by project | |
| 17 | + |
| 18 | +### Example Conversion |
| 19 | + |
| 20 | +**todo.txt:** |
| 21 | + |
| 22 | +``` |
| 23 | +(A) 2024-03-10 Call client +Sales @phone due:2024-03-15 |
| 24 | +x 2024-03-05 2024-03-01 Complete report +Reports |
| 25 | +``` |
| 26 | + |
| 27 | +**TaskMark:** |
| 28 | + |
| 29 | +```markdown |
| 30 | +# TODO |
| 31 | + |
| 32 | +## Sales |
| 33 | +- [ ] (A) 2024-03-10 Call client +Sales #phone due:2024-03-15 |
| 34 | + |
| 35 | +## Reports |
| 36 | +- [x] 2024-03-01 2024-03-05 Complete report +Reports |
| 37 | +``` |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## todo.md Conversion |
| 42 | + |
| 43 | +| Element | todo.md | TaskMark | Conversion Rule | |
| 44 | +|---------|---------|---------|----------------| |
| 45 | +| States | `[ ]`, `[x]`, `[-]` | `[ ]`, `[x]`, `[-]`, `[!]` | Add `[!]` if needed | |
| 46 | +| Priority | Not standardized | `(value)` after state | Add if needed | |
| 47 | +| Metadata | Freeform | `key:value` | Standardize format | |
| 48 | +| Recurrence | Not supported | `repeat:PATTERN` | Add if needed | |
| 49 | +| File links | Not supported | `[text](file.md)` | Add if needed | |
| 50 | + |
| 51 | +### Example Conversion |
| 52 | + |
| 53 | +**todo.md:** |
| 54 | + |
| 55 | +```markdown |
| 56 | +# Tasks |
| 57 | + |
| 58 | +- [ ] Important task |
| 59 | +- [x] Completed task |
| 60 | +- [-] Cancelled task |
| 61 | +``` |
| 62 | + |
| 63 | +**TaskMark:** |
| 64 | + |
| 65 | +```markdown |
| 66 | +# TODO |
| 67 | + |
| 68 | +## Tasks |
| 69 | +- [ ] (A) Important task |
| 70 | +- [x] Completed task |
| 71 | +- [-] Cancelled task |
| 72 | +``` |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## xit Conversion |
| 77 | + |
| 78 | +| Element | xit | TaskMark | Conversion Rule | |
| 79 | +|---------|-----|---------|----------------| |
| 80 | +| Date headers | `2024-03-15` | `## Section` | Convert to sections | |
| 81 | +| States | `[ ]`, `[x]`, `[-]` | `[ ]`, `[x]`, `[-]`, `[!]` | Add `[!]` if needed | |
| 82 | +| Metadata | `key:value` | `key:value` | Extract core fields | |
| 83 | +| Priority | Not supported | `(value)` | Add if needed | |
| 84 | +| Projects | `project:name` | `+name` | Convert syntax | |
| 85 | + |
| 86 | +### Example Conversion |
| 87 | + |
| 88 | +**xit:** |
| 89 | + |
| 90 | +``` |
| 91 | +2024-03-15 |
| 92 | +[ ] Deploy to staging project:Backend |
| 93 | +[x] Write tests project:Backend |
| 94 | +[-] Skip documentation |
| 95 | +``` |
| 96 | + |
| 97 | +**TaskMark:** |
| 98 | + |
| 99 | +```markdown |
| 100 | +# TODO |
| 101 | + |
| 102 | +## 2024-03-15 |
| 103 | +- [ ] Deploy to staging +Backend |
| 104 | +- [x] Write tests +Backend |
| 105 | +- [-] Skip documentation |
| 106 | +``` |
| 107 | + |
| 108 | +--- |
| 109 | + |
| 110 | +## Bidirectional Conversion Notes |
| 111 | + |
| 112 | +| Direction | Data Loss | Notes | |
| 113 | +|-----------|-----------|-------| |
| 114 | +| todo.txt → TaskMark | None | Full compatibility | |
| 115 | +| TaskMark → todo.txt | Sections, blocked state, subtasks | Use project tags for sections | |
| 116 | +| todo.md → TaskMark | None | Full compatibility | |
| 117 | +| TaskMark → todo.md | Priority, metadata, recurrence | Lossy conversion | |
| 118 | +| xit → TaskMark | None | Full compatibility | |
| 119 | +| TaskMark → xit | Sections, assignees | Use date headers | |
0 commit comments