GothenburgBitFactory / GothenburgBitFactory/timewarrior

Custom hints for reports

Open
#785 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.7k
Forks
117
Avg merge
1d 7h
Merged PRs (30d)
5

Description

This is a feature request (I believe, because I could not find a way to address the use case via the existing docs ... also happy to have this shifted into a Discussion if need be).

It would be helpful for the user to be able to define custom "hints" to employ in summary reports. In context, there are several pre-defined hints that get expanded automatically into time intervals. So one can run `timew summary :month` at any point and get a summary returned calculated from the beginning of the current month up to the present moment (or ... possibly present day; I'm not 100% sure if I remember that precisely).

There are a few other such hints already; `:year`, `:week`, and `:quarter` for example. However, it's a fixed set, and I frequently run into one that's missing. Say, month-by-name. It'd be possible to request the addition of a bunch of new hints to cover that, so that `time summary :june` would work, or `timew summary :q1` ... but that is a lot of new keywords. And there are other timeframes on which users may need to define a hint that fits into their specific work. Which makes me think it'd be a more useful solution to permit users to configure their own hints in one way or another.

For example, students, teachers, or others in academia could make ready use of a `:semester` or `:term` hint ... but the start and end dates are obviously going to vary from user to user (and could change between years, if things like holidays are involved).

As far as I can tell, this is not currently supported, but I of course might have overlooked something ... I did try, though. It is also currently possible to route around this by wrapping Timewarrior itself in aliases or shell scripts and sort of get the desired behavior, but that clearly comes with the cost of maintaining and updating the wrapper scripts, some mental overhead to remember which shortcuts use the wrapper and which require standard syntax, and the complexity of writing wrappers that work in each OS+shell permutation that the user interacts with.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing documentation and tracing the built-in hints used by `timew summary`, including `:month`, `:year`, `:week`, and `:quarter`. Done means users can define custom date-range hints, use them with summary reports, and support periods whose dates vary between users or years.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.