Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

110 Commits

Repository files navigation

task.json

Task.json is inspired by todo.txt. It uses JSON format, which is widely used in programming and thus extensible and easy to read for programs. The JSON format can also be edited directly.

The JSON format overcomes the problem in the strict rules of todo.txt that some fields might be lost in the completed task (e.g. priority). It also provides more flexibility to add custom fields for other applications.

task.json format (v2)

task.json is a large multi-line string (usually stored in a file) that consists of a number of tasks where each task is a single-line JSON string. (note: there's a newline character after the last task). Using single-line JSON for each task enables programs to append to a the file when a new task is added. Besides, it works well with Linux command line tools like grep.

Fields for each task are defined as follows:

FieldTypeRequiredDescription
idstringyesUnique ID for a task
statusStatusyesStatus of current task
textstringyesThe description of a task
prioritystringnoPriority of a task (A-Z)
projectsstring[]noProject tags
contextsstring[]noContext tags
depsstring[]noDependencies
dueDateTimenoDue date
waitDateTimenoDate until task is shown
createdDateTimeyesCreated date of a task
modifiedDateTimeyesModified date of a task
doneDateTimenoDone date of a task

The Status type above can be one of the following string: todo, done, removed.

The DateTime type above represents a string in ISO 8601 format. UUID is recommended for id but not mandatory.

The format mainly follows the definition of todo.txt but adds some new fields for more features.

The removed, id and modified fields are necessary for synchronization between multiple tasks.

Generally, task.json can be treated as a list of JSON tasks. It's usually parsed line by line and finally collected into a list. It's recommended to sort tasks by created date but not required.

Libraries

Related Projects

Acknowledgement

The logo is modified based on the icon credited to Materidal Design Icons.

License

All code licensed under AGPL-3.0. Full copyright notice:

Copyright (C) 2020-2023 DCsunset
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

About

The definition of task.json and related projects and libraries.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages