- Add parser for todo.txt tasks supporting priority, dates, projects, contexts, and key:value metadata - Include full todo.txt format specification (SPECS.md) and visual description (description.svg) - Add sample test.todo.txt file with valid, borderline, and malformed cases - Initialize Go module and main entrypoint for parsing and JSON output - Add .gitignore for binary artifacts
91 lines
2.0 KiB
Plaintext
91 lines
2.0 KiB
Plaintext
# Valid tasks
|
|
(A) Call Mom +Family @phone
|
|
(B) Schedule Goodwill pickup +GarageSale @phone
|
|
Post signs around the neighborhood +GarageSale
|
|
@GroceryStore pies
|
|
2011-03-02 Document +TodoTxt task format
|
|
(A) 2011-03-02 Call Mom
|
|
x 2011-03-03 Call Mom
|
|
x 2011-03-02 2011-03-01 Review Tim's pull request +TodoTxtTouch @github
|
|
(A) Call Mom due:2024-12-31
|
|
x 2024-11-24 2024-11-20 Finish project due:2024-12-01 +Work @office
|
|
|
|
# Valid metadata
|
|
Buy milk due:2024-12-01
|
|
Do taxes taxyear:2024
|
|
Plan trip location:Rome
|
|
|
|
# Valid multiple projects/contexts
|
|
(A) Call Mom +Family +PeaceLoveAndHappiness @iphone @phone
|
|
|
|
# Borderline: priority not at start
|
|
Really gotta call Mom (A) @phone @someday
|
|
(B)->Submit TPS report
|
|
(b) Get back to the boss
|
|
|
|
# Borderline: creation date not at start
|
|
(A) Call Mom 2011-03-02
|
|
|
|
# Borderline: completed but missing completion date (should error)
|
|
x Call Mom
|
|
|
|
# Borderline: project/context with only symbol
|
|
Do something +
|
|
Do something @
|
|
|
|
# Borderline: key:value with protocol as key (should NOT be metadata)
|
|
http://example.com
|
|
https://example.com
|
|
ftp://server.com
|
|
mailto:someone@example.com
|
|
|
|
# Borderline: key:value with protocol as key (should NOT be metadata)
|
|
http:example.com
|
|
https:example.com
|
|
ftp:server.com
|
|
mailto:someone@example.com
|
|
|
|
# Borderline: key:value with value as URL (should be metadata)
|
|
link:http://example.com
|
|
website:https://example.com
|
|
|
|
# Borderline: key:value with spaces (should NOT be metadata)
|
|
foo:bar baz
|
|
foo :bar
|
|
foo: bar
|
|
|
|
# Borderline: key:value with multiple colons (only first is split)
|
|
multi:colon:example
|
|
|
|
# Borderline: empty line
|
|
|
|
|
|
# Malformed: priority with lowercase letter
|
|
(a) Call Mom
|
|
|
|
# Malformed: completed with uppercase X
|
|
X 2012-01-01 Make resolutions
|
|
|
|
# Malformed: completed with x not at start
|
|
(A) x Find ticket prices
|
|
|
|
# Malformed: date with invalid format
|
|
(A) 2024-13-99 Call Mom
|
|
x 2024-99-99 Call Mom
|
|
|
|
# Malformed: key:value with whitespace in key or value
|
|
foo bar:baz
|
|
foo:bar baz
|
|
foo:bar:baz
|
|
|
|
# Malformed: only symbols
|
|
+
|
|
@
|
|
:
|
|
|
|
# Malformed: random text
|
|
Just a random line with no special tokens
|
|
|
|
# Malformed: only spaces
|
|
|