Git Product home page Git Product logo

ttdl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttdl's Issues

Problem when addind a todo

If I do this

ttdl add "Call my grandma at 14:30h @phone due:1d"

I get

e:1d"
Added todo:
 # D P Created    Finished   Due        Subject
------------------------------------------------
59                           2021-01-22 Call my grandma at @phone 14:30h

Of course I like to see

9                           2021-01-22 Call my grandma at 14:30h @phone

Is this a bug on ttdl's side or am I the problem?

Config parse error when specifying global filename

When i tried to specify a global filename for where to store the todo.txt like this:

filename = "C:\Users\<my-username>\Apps\ttdl\todo.txt"

i got this error

Failed to parse config file: Error { inner: ErrorInner { kind: InvalidHexEscape('s'), line: Some(67), col: 16, message: "", key: [] } }

And it used default values.

When i changed from double quotes to single quotes:

filename = 'C:\Users\<my-username>\Apps\ttdl\todo.txt'

it seems to work as expected.

Using Win10
Powershell 7.1.1
ttdl v1.0.0

New flag 'cancelled'

Add 'cancel' command. Need a design: what to do. Initial idea: cancel marks the task done and adds a tag "cancel:true", then show such todos with different color or special mark in 'D' column.

Filter to exclude context

I have a context for "Things to read" which is a pretty big list! I'd love to be able to hide it. I thought something like ttdl ls -@ThingsToRead or ttdl ls !@ThingsToRead would work.

Consider forcing first arg to be a subcommand?

I have accidentally added several entries from typos or experimenting with commands, for example:

18:15:38 ~ 0s
❯ ttdl del
Added todo:
 # D P Due        Subject
--------------------------
78                del

18:16:04 ~ 0s
❯ ttdl help
Added todo:
 # D P Due        Subject
--------------------------
79                help

This is more of a design or usability consideration, rather than a bug. Perhaps it would be worthwhile forcing use of the a or add subcommand to add an entry, rather than auto adding on an unrecognized command? I'm all for consistency and one well defined way to do an action.

--due not working as before

I updated to ttdl 3.0.0

Before when doing

ttdl list  pattern --due=none..45d

I got listed all tasks without due date as well.

With 3.3.0 this is no longer true. Now, tasks without any due date won't get listed. Anything has changed here?

Default apply threshold filter "none..today"

Threshold is used to hide tasks I can't deal with for a few days. It would be useful therefore if --threshold none..today was applied by default when running ttdl list unless I specifically override it by supplying --threshold, e.g. ttdl --threshold=tomorrow.

Add text to existing todos

Now the only way to change todo's text is to replace its entire text with 'edit'. Add 2 new commands: append and prepend

Add color for old tasks

Hilite creation date id it is older than N days. Do not hilite recurrent tasks' creation dates. By default hilite is off

Relative date

Only due and threshold fields support relative date display.

  • Make 'created' and 'finished' to support it as well
  • extend option '--human' - allow to set fields that must be human-readable (with some default value)

`--set-rec` seems to have no effect

Reproduction, last commands shows that edit generally works. It seems specific to rec that's broken.

/tmp 2m 17s
❯ ttdl --version                                               
TTDL Version 3.3.0

/tmp
❯ ttdl --todo-file todo.txt add 'Hello, world +filter'
Added todo:
# D P Created    Finished   Due        Subject
-----------------------------------------------
1     2022-07-24                       Hello, world +filter

/tmp
❯ ttdl --todo-file todo.txt ls +filter                
# D P Created    Finished   Due        Subject
-----------------------------------------------
1     2022-07-24                       Hello, world +filter
-----------------------------------------------
1 todos (of 1 total)

/tmp
❯ ttdl --todo-file todo.txt edit +filter --set-rec=1w
No todo was changed

/tmp
❯ ttdl --todo-file todo.txt edit +filter --set-proj=someproject 
Changed todos:
# D P Created    Finished   Due        Subject
-----------------------------------------------
1     2022-07-24                       Hello, world +filter +someproject
-----------------------------------------------
1 todos

Problem with ttdl done

There is a problem with ttdl done which did exist prior to 3.0.0. I just forgot to report it.

Doing

ttdl done  14,20-22

gives

No todo was completed

but

ttdl done 14
ttdl done 20-22

works fine.

Add ability to load config file from a given path

Suggested syntax:

ttdl -c|--config <path-to-config>

For reference todo.sh uses -d to load its config, -c is for color in its case.

Other thing I'd suggest is to move config file to a separate folder, i.e. to ~/.config/ttdl/ttdl.toml. Yes, it's just a single config file, but there is normally enough system-generated stuff inside ~/.config so it's nice to have important for user settings inside a corresponding application folder. This is subjective, of course, but I'd welcome such change and call it an improvement.

Persistent IDs

It may be convenient to use IDs for todos:

  • they are not unique to be able to group todos (in this case it is close to +context meaning)
  • where the number of a todo is used, ID is good to go as well (maybe with optional id: prefix when an ID is a number. For alphanumeric ID it can be auto-detected)
  • reserve parent: for referring to another ID. It may be useful to keep todo hierarchy. And when closing the main todo, all todos that refers to it are closed automatically as well. And closing all children may auto-close the main todo
  • anything else?

--fields on cli has no effect if fields set in config file

If I have the following set in config:

[global]
fields = "pri,done,due"

ttdl list outputs the headers # D P Due Subject as expected.

But if I try to override the fields on the cli, like ttdl list --fields 'due,thr', the changes are not overridden. If I then remove the fields = config from the config file, the --fields flag override does work.

I would expect the --fields flag to override anything set in the config file.

Load user config from ./config/ttdl/ttdl.toml

Other thing I'd suggest is to move config file to a separate folder, i.e. to ~/.config/ttdl/ttdl.toml. Yes, it's just a single config file, but there is normally enough system-generated stuff inside ~/.config so it's nice to have important for user settings inside a corresponding application folder. This is subjective, of course, but I'd welcome such change and call it an improvement.

Show stats

Statistics about todos: total, done, overdue, today, soon etc

Make ading a todo a default action

Now, if a command is not set , TTDL always executes "list" command.

  • It makes sense to execute "add " if a "subject" is defined in command line
  • Run 'list' if command line does not have a command, subject, and '-h'

Support 256- and 24bit-colored terminal

At this moment only 16 colors are supported (and underline + bold attributes). Allow a user to set RGB or indexed(for 256-color terminals) text color, but without extra flags like intense, bold etc

Unexpected different list outputs

Here the way to reproduce the behavior:

$ cat ttdl-cat
#!/bin/sh
cat
$
$ cat todo.txt
2020-07-21 TEST @update due:2020-07-21 aa:11 bb:22 rec:1y cc:33
2020-07-21 TEST @update due:2020-07-21 aa:11 bb:22 rec:1y cc:33 !cat:true
$
$ ttdl
# D P Created    Finished   Due        Subject
-----------------------------------------------
1 R   2020-07-21            2020-07-21 TEST @update rec:1y
2 R   2020-07-21            2020-07-21 TEST @update !cat:true aa:11 bb:22 cc:33
-----------------------------------------------
2 todos (of 2 total)

The first item doesn't include aa:11 bb:22 cc:33, and the second item doesn't include rec:1y, should be the only difference is including !cat:true for the second output in this case?

Completing task with threshold and rec should create new task

I noticed that a task containing t: and rec: will not recur like a task containing due: will.

/tmp
❯ ttdl --local add 'Task t:today rec:1w'
Added todo:
# D P Created    Finished   Due        Subject
-----------------------------------------------
1 R   2021-10-03                       Task t:2021-10-03 rec:1w

/tmp
❯ ttdl --local done 1                   
Changed todos:
# D P Created    Finished   Due        Subject
-----------------------------------------------
1 x   2021-10-03 2021-10-03            Task t:2021-10-03 rec:1w
-----------------------------------------------
1 todos

/tmp
❯ ttdl --local list  
# D P Created    Finished   Due        Subject
-----------------------------------------------
-----------------------------------------------
0 todos (of 1 total)

Note, some tasks might have both t: and due: with different dates set (e.g. report is due on a date, but the data for it isn't ready until 3 days before the due date).

Handling of "mark recurring tasks as done"

Hi Vladimir,

I have some less important recurring tasks, but still with a due date set to nag me to do them once in a while.
If a task is due every week and I didn't do it for a while, I need to mark it as done multiple times. Example:

Today 2020-07-22:

$ ttdl d 53
Changed ttdls:
  # D P Created    Finished   Due        Subject
-------------------------------------------------
 53 R   2020-06-22            2020-07-11 Read newspaper article rec:1w
-------------------------------------------------
1 ttdls (of 115 total)

$ ttdl d 53
Changed ttdls:
  # D P Created    Finished   Due        Subject
-------------------------------------------------
 53 R   2020-06-22            2020-07-18 Read newspaper article rec:1w
-------------------------------------------------
1 ttdls (of 115 total)

$ ttdl d 53
Changed ttdls:
  # D P Created    Finished   Due        Subject
-------------------------------------------------
 53 R   2020-06-22            2020-07-25 Read newspaper article rec:1w
-------------------------------------------------

Improvement idea: When marking a recurring task as done, pick the next due date until the new date is later than $now.

What do you think?

Allow using a list of IDs

Supported cases: single ID and ID range(M-N). It would be good to support list of ID(ID1,ID2,ID3)

feature request: allow --set-due argument for new tasks

currently to create a task with a due date, two calls are required:

$ ttdl new snakes
Added todo:
# D P Created    Finished   Due        Threshold  Spent  Subject
-----------------------------------------------------------------
4                                                        snakes
$ ttdl edit 4 --set-due=2020-07-03
Changed todos:
# D P Created    Finished   Due        Threshold  Spent  Subject
-----------------------------------------------------------------
4                           2020-07-03                   snakes
-----------------------------------------------------------------
1 todos (of 4 total)

it'd be much nicer to reduce this to one call, like: ttdl new snakes --set-due=2020-07-03
incorporating #28 into this would make this really slick.

task_done sets creation date of task

Hello Vladimir,

I'm just playing around with ttdl and I'm not sure about the side effects of the "done" command.
Consider a simple task list consisting of one task:

something

After running ./ttdl done 1, the content of todo.txt looks like:

$ cat todo.txt 
x 2020-06-20 something

If the idea was to set the done date of a task automatically, ttdl must also set a creation date.
The format spec here https://github.com/todotxt/todo.txt says that the creation date must be set if the completion date is set.

Cheers,
Thomas

Completing issue with `rec:` does not mark the old task as complete

In the following, I would expect the final command to output differently.

/tmp
❯ ttdl --local list  
# D P Created    Finished   Due        Subject
-----------------------------------------------
-----------------------------------------------
0 todos

/tmp
❯ ttdl --local add 'Task due:today rec:1w'
Added todo:
# D P Created    Finished   Due        Subject
-----------------------------------------------
1 R   2021-10-10            2021-10-10 Task due:2021-10-10 rec:1w

/tmp
❯ ttdl --local done 1                     
Changed todos:
# D P Created    Finished   Due        Subject
-----------------------------------------------
1 R   2021-10-10            2021-10-17 Task due:2021-10-17 rec:1w
-----------------------------------------------
1 todos

/tmp
❯ cat todo.txt                
2021-10-10 Task due:2021-10-17 rec:1w

Instead, I would expect todo.txt to contain:

2021-10-10 Task due:2021-10-17 rec:1w
x 2021-10-10 2021-10-10 Task due:2021-10-10 rec:1w

feature request: --set-due argument should decode human-readable dates

Currently the --set-due argument requires a date, it'd be nicer if it could accept a human-readable form like:

--set-due=tomorrow
--set-due=3d
--set-due=1w
--set-due=1m

$ ttdl new snakes
Added todo:
# D P Created    Finished   Due        Threshold  Spent  Subject
-----------------------------------------------------------------
4                                                        snakes
$ ttdl edit 4 --set-due=2020-07-03
Changed todos:
# D P Created    Finished   Due        Threshold  Spent  Subject
-----------------------------------------------------------------
4                           2020-07-03                   snakes
-----------------------------------------------------------------
1 todos (of 4 total)

feature request: list the overdue, today and soon items only at once

Currently the only way to list overdue, today and soon items only is passing 3 commands:

  • ttdl list --due overdue
  • ttdl list --due today
  • ttdl list --due soon

It's OK for manually checking, but it's hard to generate a summary for external program, is it possible to support the feature? Thanks!

BTW, there's possible an issue for overdue filter, it doesn't display the 2020-07-01 Test due:2020-07-14 rec:1m item if the current date is 2020-07-15.

  • implement custom flexible filter for due date (in addition to existing soon, today etc)
  • add a section to docs about filter (it gets a bit complicated, so it needs its own detailed description)

Display todos by groups

and add a total for each group.

To think:

  • how to group when a few tags are set? E.g, two contexts

Change default field list

Showing the full record is too much. Most of the time it is enough to have a minimal set of them.

  • Use "done,pri,due" as default field list
  • Add option --full to show all columns

Add filter for no context or no tags

This is something that I'm looking for to support my gtd-like workflow, where no context == inbox.

Given the todo.txt contents:

2020-12-25 task 1 @next
2020-12-25 task 2 @backlog
2020-12-25 task 3

A command like ttdl list --no-context should output:

 # D P Due        Subject
--------------------------
 3                task 3

Ditto for tags.

Support more filter options for threshold

I want to filter to display only tasks with no threshold date, or a threshold date <= today. The standard filter options support this with the none..today range, but this isn't implemented for thresholds:

❯ ttdl list --due none..today
# D P Created    Finished   Due        Subject
...

❯ ttdl list --threshold none..today
invalid value none..today for date range

Is there a design reason why thresholds should be treated differently to other date fields for filtering? Otherwise can we update the behaviour to be consistent with the others? (If so, I'm happy to open a PR)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.