samg / timetrap

Simple command line timetracker
http://rubygems.org/gems/timetrap
Other
1.48k stars 116 forks source link

Feature request: Search for keywords #112

Closed nvaken closed 4 years ago

nvaken commented 9 years ago

I'm labeling my entries as SUPPORT - Helping customer X with getting task Y done. Currently I grep my today overview to review what time I've spent on SUPPORT, eg. t today | grep SUPPORT. This gives me a pretty good indication of what I've spent on support, but I'd love to see the total amount of time. So maybe something like t today --filter SUPPORT would be a nice addition? Or did I just overlook things in the manual?

smartmic commented 9 years ago

Very good idea. Maybe it could also be realized via a tag command --tag SUPPORT will add @SUPPORT and allow filtering.

kotp commented 9 years ago

The formatter called total does not do this for you? I use different time sheets, so perhaps my organization is different from how you are using it?

smartmic commented 9 years ago

Not really in my case. I use different time sheets for different projects but I need some more refinement for reporting within one project. The project is split into several task and I want to tag those task. At @nvaken wrote, same like grep functionality but summing up the time expenses. I have checked the time_formatters and it should not be a big deal to implement it. I just wonder if it has be done already by someone because it should be a quite frequent problem.

kotp commented 9 years ago

Do you use hashtags, like #task1 #task2 for the tasks in your projects, or totally different timesheets one for each task, perhaps? How would you like it to work?

nvaken commented 9 years ago

I would love to see this work just like grep, hashtags would imply that I'd have to tag everything I'd like to filter in the future. This might end up in those kind of horrible tweets with way to much concatenated tags like #awesome #lovemylife #ihavenoideawhatimdoing.

My post above (Apr 20th) does indeed show my intentions for searching for a tag, though I can imagine that I might want to search for keywords in the message as well. For example, I might want to find every entry that enlists a colleague's name: t today --filter 'Chuck Norris' and get all my entries I've added Chuck's name to. This is just a quick example though, filtering like this might have other usecases too.

I'd also suggest making it possible to add more complex queries like regular expressions.

smartmic commented 9 years ago

Pseudocode: filter all entries from sheet matching regex and sum up total time for the resulting selection

categulario commented 4 years ago

I think this was solved by the -g option. Closing for now