TodoTxt
Todo.txt parser/serializer for Node and io.js.
API
// npm install --save todotxt var todotxt = ; todotxt; // -> [items]todotxt; // -> stringtodotxt; // item
Sample usage
Parse file
sample todo:
Hello @Home @Alone
Hello (2)
Hello (again) @Home +Project1 +Project2
First task
x 2015-03-19 Second task
(A) Third task
2015-03-17 another task
var items = todotxt; items;
output:
[ ] Incomplete task: Hello @Home @Alone
[ ] Incomplete task: Hello (2)
// deleted task
[ ] Incomplete task: Hello (again) @Home +Project1 +Project2
// deleted task
[ ] Incomplete task: First task
[x] Complete task: Second task
[ ] Incomplete task: Third task
[ ] Incomplete task: another task
Stringify items
var items = todotxt null todotxt; // You can modify itemsitems1;items1date = "2015-03-20"; console;
output:
x Hello +Project
2015-03-20 Another task @SomeContext