todotxt / todo.txt

‼️ A complete primer on the whys and hows of todo.txt.
GNU General Public License v3.0
2.33k stars 102 forks source link

Proposal for new todo.txt format - P4W #28

Closed kaushiknfs closed 3 years ago

kaushiknfs commented 4 years ago

Hi, I thought todo.txt needs a makeover and spent sometime to write up a new proposal for todo.txt, called P4W. Please read through and provide suggestions.

Thanks in advance - p4w.pdf

(Moving pdf content into here - @karbassi 2020-01-07)

P4W

Priority, What, When, Who and Where

Premise: Tasks having context are way better than tasks which don’t, they can be categorized, group, searched and analyzed based on these contexts.

But all contexts aren't created equal, then why should their prefixes be? And having defined categories of contexts makes life easier. The task list should be easily enterable and readable by eye with familiar symbols marking contexts.

The categories P4W - Priority, What, When, Who and Where.

n.n (pri) #action for +project with &person at @place on -today
1. (B) #email &john regarding the new design for +p4w -today

Priority:

Weight/Priority of this task. (A), (B), (C), (D)

What: Project: prefix +

The project in which this task belongs. (one +)

Ex. +project, +p4w

What: Action: prefix #

Verb, Action item in the task. (two +s making a #)

Ex. #email , #call, #code, #analyze, #meeting

When: prefix -

Time bucket for this task.

Ex. -today, -week, -month, -backlog

Who: prefix &

Person involved in this task or delegated to. (you & who?)

Ex. &kaushik, &bill, &jane

Where: prefix @

Place where you want to do this task. (happens @ where ?)

Ex. @home, @work, @paris, @mall

Subtasks

Uses the id. Subtasks have a decimal part. All tasks between n and n+1 are subtasks of n.

Best said with an example.

2. (B) new year gifts 2.1 (B) #buy gift for &jane @mall 2.2 (B) #buy gift for &bill @walmart

Few other contexts which may be added to add value.

Effort prefix =

Track the effort spent on a task. = followed by an integer representing the denomination of your choice, hours, days or pomodoros.

3. (B) #write doc for +p4w =2

Dependent tasks prefix ! A task which this task depends on.

4. (A) #ship documents to &jane +newapp !3

What is dropped.

Created Date Time.

It's really cumbersome to type in YYYYMMDD for each task you create and also the creation date serves very little purpose.

Completed Date Time.

It's easier to add one date to the done.txt and list the tasks done under it rather than adding done date to every other task. More readable.

Done.txt

20190101
X (A) #call &jane
X (B) #code +p4w demo @work =2
X (A) #call &dad @home
20190102
X (B) drop car for service
X (B) #email john about +p4w

Due

Due serves very little purpose unless you search the task list for the current date YYYYMMDD , the scheduling for such tasks must be done on an actual calendar application or reminders which is more meant to do such jobs.

id:value

Again, they make the task line complex, less readable, all necessary purposes would be met by P4Ws themselves.

andoresuperesu commented 4 years ago

Man, this is beautiful. I'll start using this immediately.

AbhayaGH commented 4 years ago

this is a nice proposal, in particular for new prefix, however the 'chapter' and subtask part break some requirement of todo.txt. we lost ordering priority by ordering by line in a text editor and using subtasks, we don't really have anymore 1 task by line. As far as i could understand, the todo.txt is dedicated to simple tasks list, this P4W format is nice but goes out of the scope. What about a 'project.txt' format dedicated to more complex tasks list? :)

karbassi commented 4 years ago

What about a 'project.txt' format dedicated to more complex tasks list? :)

I like this idea. We should explore this more.

kaushiknfs commented 4 years ago

I'm working on a javascript library and a single page front end with dropbox file backend as a POC. will share with you folks soon. Screenshot_2

AbhayaGH commented 4 years ago

What about a 'project.txt' format dedicated to more complex tasks list? :)

I like this idea. We should explore this more.

P4W is a very good start. I think to add a "header" for a group of tasks, this can be done the old fashion windows INI file with bracket: [My group of tasks] as we loose 1 task/line anyway. In a project purpose, we need the "how long to do it" data to execute the task. The ">" sign prefix can be use with ISO 8601 format: https://en.wikipedia.org/wiki/ISO_8601#Time_intervals.

What do you think?

kaushiknfs commented 4 years ago

We arent losing 1task/line, thats the essence, since we are not going to have multiline tasks. We are simple adding a grouping by [My group of tasks] which is a wonderful idea btw.

kaushiknfs commented 4 years ago

Ali Karbassi, can you make a core commitee for the new spec. We can get together, talk and get it moving? Thanks.

AbhayaGH commented 4 years ago

Ali Karbassi, can you make a core commitee for the new spec. We can get together, talk and get it moving?

or may be create a new repo for projecttxt.

ingoogni commented 3 years ago

This is nice. It comes very close to something I have in a SQlite database for projects and processes. For a different application I parse outline text files and store them in a database. A plain text file is a nice 'GUI' for doing this. So, just a few thoughts.

With this proposal I think you loose the unstructuredness of todo.txt and you have to keep projects together in blocks. You can have multiple projects per file.

When keeping projects in blocks, you can get rid of the numbering by using indentation. Inserting a line and having to renumber lines is cumbersome. For reading text the indentations is clear.

For parsing 'line numbers' can be generated by counting indentation depth. When recreating the text the line numbers can be converted back to indentation levels.

Child parent relationships are clear too and appropriate references in a DB can be constructed from it.

+ProjectNewYear
    (B) new years gifts
        x  #buy gifts for &Jane @Mall +Shopping
        (B) #buy gifts for &Bill @Mall +Shopping
    (A) new years eve dinner
        (A) #find recipe

As the concept is usable for projects as well as processes being able to use date-time is important. In my DB there are 5 timestamps for a single todo line: ts_due, ts_start, ts_complete, ts_from, ts_eol. All are optional although ts_from defaults to the day the todo is added. Having dates is also usefull for parsing and converting for use with WebDav, or for creation of Gantt views.

Dependencies are easy in a DB but no so in a text file. When using linenumbers after insertions or deletions all have to be checked. Maybe add a symbol to a line that has dependencies? !1 depends on *1? It makes it explicit that there are actions depending on the one with a '*'.

There is one other thing I use a lot. Notes. In my personal outline format paragraphs can have children, but they can only be of the type note. Notes can not have children.

+ProjectNewYear
    (B) new years gifts
        x #buy gifts for &Jane @Mall +Shopping
            note:Ninja_sword
        (B) #buy gifts for &Bill @Mall +Shopping
    (A) new years eve dinner @Home
        (A) #find recipe note:'allergies &Bill'

Having notes can turn a project.txt into a tool for customer support or into a log book.

loziniak commented 3 years ago

In this form we seem to lose sortability. In current form, it's easy to put most important / oldest tasks first by a command like cat todo.txt | sort | head -20.

In my project I also extended a format with task IDs (in form t1, t2...), but placed it after priority and creation date.

With due I think maybe prepending due date before creation date with "->" in front, and after priority would be good for sorting, so tasks with due date would be sorted before tasks that don't have it, and after tasks that have priority. Like:

(A) -> 2011-03-22 2011-03-01 Review Tim's pull request +TodoTxtTouch @github