Add configurable default range for reports

Query rule 'reports.<name>.range' for the specific default range of the report.
Use rule 'reports.range' to configure an overall default range for all reports.
Make internal reports 'summary', 'month', 'week', 'day', and 'gaps' use this feature.

Closes #477

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2022-09-23 14:04:01 +02:00
parent d056719a36
commit 5265b26e86
8 changed files with 84 additions and 11 deletions

View file

@ -18,3 +18,14 @@ This does however assume there is a 'foo' extension installed.
The return code is the return code of the extension.
If the extension produces no output and a non-zero rc, then 255 is returned.
== CONFIGURATION
**reports.range**::
Sets the default date range for all reports.
The value has to be a range hint, see timew-hints(7).
Defaults to `:all`
**reports.**__<name>__**.range**::
Set the date range for report _name_, where _name_ is the name of the report executable without its extension (i.e. a report executable 'foo.py' is referred to by 'foo').
The value has to be a range hint, see timew-hints(7).