A JavaScript parser and container for the TODO files in the todo.txt format.
A mapping of what to do for each CLI command (and an implementation status).
- Multiple lists - multiple in-memory lists are supported through multiple
instances of
TodoList
. Todo: Ability to persist and retrieve from a file. add|a
- Implemented.TodoList.add(task)
addm
- Will be implemented as a file reader. CallTodoList.add
lots.addto
- CallTodoList.add
on the correctTodoList
instance.append|app
- Implemented:TodoList.append(id, text)
,TodoItem.append(text)
.archive
- Todo with file management.deduplicate
- Implemented:TodoList.deduplicate()
del|rm
- Implemented:TodoList.remove(id)
depri|dp
- Implemented:TodoList.deprioritise(1)
,TodoItem.deprioritise()
do
- Implemented:TodoList.findById(id).complete()
,TodoList.complete(1, 2, 3)
list|ls
- Implemented:TodoList.list(term, priority, case_sensitive, completed)
. Todo: helpers/aliases (below)listall|lsa
- Implemented:TodoList.listAll([term], [priority], [case])
listcon|lsc
- Implemented:TodoList.contexts()
listproj|lsprj
- Implemented:TodoList.projects()
move
- Todo with file management.prepend|prep
- Implemented:TodoList.prepend(id, text)
,TodoItem.prepend(text)
.pri|p
-TodoItem.priority = "A"
,TodoList.prioritise(1, "A")
replace
-TodoList.replace(1, "New task text")
.report
- Todo.
This library aims to be both <script>
and module compatible (so you can use it
with node/rhino). I think it's CommonJS compatible at the moment - if it's not
and you know how to make it so - please send a PR! Finding good information on
this has been difficult.
Tested with Jasmine - these can be run using SpecRunner.html which runs them in
the browser, or by node using node-jasmine (npm test
).
This project does things quite similarly to jsTodoTxt; it also:
- Has a list container that allows for actions on the list (such as add, append, pri, sorting etc.) from the CLI tool.
- Should be both client and server compatible.
- Contains an EBNF notation.
Why not fork? I wanted to have a bash at building a JS lib from scratch :)
Primarily developed for a todotxt-demo app.