Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"stats" subcommand #99

Open
Dieterbe opened this issue Dec 14, 2020 · 3 comments
Open

"stats" subcommand #99

Dieterbe opened this issue Dec 14, 2020 · 3 comments

Comments

@Dieterbe
Copy link
Contributor

I'm working on a subcommand that shows the number of tasks in each state (subject to the persisted context).
so that you can do something like this:

$ dstask stats
pending 1
active 2
paused 3
resolved 155
$

why? well, i'm also working on a block for https://github.com/greshake/i3status-rust
this would allow me to show a widget on my desktop showing these basic stats, similar to the existing TW block: https://github.com/greshake/i3status-rust/blob/master/blocks.md#taskwarrior

thoughts?

@naggie
Copy link
Owner

naggie commented Dec 14, 2020

Oh, an i3 integration would be great, I could regolith OS a go again. I suppose we could use the JSON output mode mechanism that @dontlaugh implemented to transfer the data to the i3 plugin.

@dontlaugh
Copy link
Contributor

dontlaugh commented Dec 14, 2020

Consider limiting this by time, such that only the stats for the last week, month, 3 months are shown.

It could indeed by implemented by reading the standard JSON output. It would be nice to have the time-filtering capability in dstask. That would be much harder to do in the near term.

@Dieterbe
Copy link
Contributor Author

I don't understand what you mean with the time limiting, or what the goal would be. I want to know the number of tasks in each state. How would filtering even work? filter by last state change? or by when the task was added into the system?

also i can see value in having json support, but that even seems overkill for what i want. simpler format is a tad easier to parse in shell context.

finally, note that i3status-rust is a 3rd party bar provider for i3. support could be potentially be added to the official i3bar, i'm not sure, but i use i3status-rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants