alanvardy / tod

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

Add "tasks completed today" count #791

Open stacksjb opened 3 months ago

stacksjb commented 3 months ago

Official client has a daily tasks completed, not sure if we can use that (might be preferable) or if will need to track/store locally (all the more reason to just use tod 😆)

Will check into API.

stacksjb commented 3 months ago

Confirmed with Todoist support that this is available through the activity logs

https://developer.todoist.com/sync/v9/#get-activity-logs endpoint and programmatically filter/count the tasks where the object_type is item, event_date is today's date and the event_type is completed.

However, since that requires extra work, I think tracking completed count locally would be more than adequate in most cases.

alanvardy commented 3 months ago

Are we thinking of making this a specific command?

I.e. tod stats completed-today or something similar?

stacksjb commented 3 months ago

We certainly could add a whole stats implementation, but that seems like a further down the road thing, might require maintaining some sort of local DB or log tracking.

My initial thought was simply a "completed" total printed as you check off, that is either stored per runtime or per day as you complete tasks - probably add to the same line as the task(s) remaining