dominikbraun / timetrace

A simple CLI for tracking your working time.
Apache License 2.0
665 stars 75 forks source link

[feature request] list records by specified range #222

Closed wh75er closed 1 year ago

wh75er commented 1 year ago

At the end of the week I like to make a summary on my project[s]. It would be handy to list records not only for a specific day, but for specified time range. I haven't found how to do it in the current version


Usage example

timetrace list records 0000-00-00 9999-99-99 -p foo will output all my records and total time spent in time range [0000-00-00, 9999-99-99] for foo project

Implementation

Not ready yet. It looks like necessary backbone feature to me. But probably could be implemented as an extension (with plugins)

Basically, I think timetrace list records must take 2 arguments, instead of 1. Second argument is optional - start_time [end_time] Then we need to iterate over record_dirs and records, which matches specified boundaries


I want to work on this feature in the near future, but first I'd like to know your thoughts on it, @dominikbraun. Is it possible to add it to the core API or should it be implemented as a plugin

dominikbraun commented 1 year ago

Hi @wh75er, thanks for you feature request! I think this can be implemented in the timetrace core.

wh75er commented 1 year ago

Well, I've made a research to implement this feature and found this. I can list all records for the specified time range with

timetrace report --start 0000-00-00 --end 9999-99-99

This will list every information I needed. I think this issue can be closed