alanvardy / tod

An unofficial Todoist command line client written in Rust
MIT License
97 stars 9 forks source link

Tod Task List: grouping #393

Open stacksjb opened 1 year ago

stacksjb commented 1 year ago

Related to #354

When listing chunks of tasks, such as "tod task list", I would definitely like the list sorted and grouped.

We could add a --sort and/or --group parameter (which is probably a good idea), but for most use cases I would like to simply have it output using some sort of predefined sort (which could certainly be "none" for those who didn't care)

Todoist official app provides "Grouping" and "Sorting" option, where grouping is done first, then sorting within. Their options are grouping by due date, date added, priority, label, or project (where applicable) Then sorting by name (alphabetical), assignee, due date, date added, priority, label, or project

For me, I primarily use project, priority, and due date.

stacksjb commented 1 year ago

Here's an example of output I would love to see:

Grouped by Priority, no sort:

 % tod task list
> Select project TEST
Tasks for TEST
P1:
    HighPriority Task

P2:
    Medium Priority Task:

P3: 
    Low Priority Task

P4:
    No Priority Task

Grouped by Priority, Sorted by Due Date:

P1:
    P1  Task Due Yesterday
    P1 task due today
    P1 task with no due date

P2:
    P2 Task Due 5 days ago
    P2 task due yesterday
    P2 task with no due date

P3:
    P3 Task Due 1 days ago
    P3 task due today
    P3 task with no due date

P4:
    P4 Task due yesterday
    P4 Task due today
    P4 task with no due date
stacksjb commented 7 months ago

Sorting work is under https://github.com/alanvardy/tod/issues/354