Commit graph

3257 commits

Author SHA1 Message Date
Thomas Lauf
30c69d8e78 Extract format constants
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
da06ff22da Add curly braces
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
8d14f8b5f6 Move retrieval of configuration up
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
86117c44e4 Add missing period
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
6f141f6301 Make display of tags column configurable
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
6fdda2bacd Extract column index calculation from loop
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
44bd1dee31 Code style: add curly braces
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
4f8a04e4ca Separate colum index from column offset
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
fabf70faa3 Add default value to Rules::getBoolean
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:07:41 +01:00
Thomas Lauf
5265b26e86 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>
2022-12-29 14:07:41 +01:00
Thomas Lauf
d056719a36 Enable to enter quoted hints as config value
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:01:20 +01:00
Thomas Lauf
29a00fbcd9 Code style: add curly braces
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:01:20 +01:00
Thomas Lauf
4a0ab1236d Add --details option
- extracts and prints affected tests

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 13:56:21 +01:00
Thomas Lauf
06e3df1d82 Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-28 22:13:35 +01:00
Thomas Lauf
30d1ba2b2a Add example descriptions
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-28 22:13:35 +01:00
Scott Mcdermott
bf26176243 Allow specification of intervals to the export command
This patch checks if intervals are given on cli to 'timew export', and
if so will filter only those numbered IDs out from the db.  This lets
the user that already knows the interval(s) they want to know about, to
ask for only those, without parsing the whole thing (similar to how we
can do this for taskwarrior IDs).

If both intervals and other filters -- time range or tags -- are given,
this is considered an error.  There would seem to be little use to AND
or OR tags/ranges with IDs because anyone that knew IDs to request would
already know those IDs met their requirement.

Fixes #510

Code additions from @lauft PR notes (thanks!):

- factor out 'filtering' so we can do only one call to getTracked()
- simplify (tag || range) to .empty(), which already checks both
- error message phrasing

Signed-off-by: Scott Mcdermott <scott@smemsh.net>
2022-12-28 22:13:35 +01:00
Thomas Lauf
e708a63612 Remove double entry
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-28 22:13:35 +01:00
Thomas Lauf
5c93b43f30 Add paragraphs
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-27 23:28:56 +01:00
Thomas Lauf
9ff8d78afc Update Authors/ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-28 21:48:23 +01:00
Thomas Lauf
25ff673521 Beautify tests
- Replace unused return variables with '_'
- Use 'expected' and 'actual' for test values
- Add whitespace

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-25 16:54:10 +01:00
Thomas Lauf
3d3faafcba Compare output of 'timew help start' to 'man timew-start'
The command timew help should redirect to the man tool.
Instead of testing that the header of the output matches some reg ex,
test that the outputs of `timew help` and `man` are equal

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-25 16:52:39 +01:00
Thomas Lauf
d8b7080dcb Compare output of command help with unknown argument with corresponding output of man command
The error message may be different depending on the man tool used.
Therefore, instead of hard-coding it into the test, ensure it is the same as produced by the man command

Closes #512

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-25 16:50:29 +01:00
Thomas Lauf
a38ecf6380 Add Alpine Linux test images
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-25 16:47:16 +01:00
Thomas Lauf
c80442c878 Make report 'totals.py' display data when no time range specified
Use interval array to determine whether there is data to display
Move interval truncation outside the loop, combine/rework 'no data' messages

Close #450

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-01 23:04:46 +01:00
Thomas Lauf
8e8df2aaa8 Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-01 18:32:56 +01:00
Thomas Lauf
49c33591b8 Make report 'totals.py' truncate intervals to search range
Closes #505

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-01 18:32:56 +01:00
Thomas Lauf
6d826cb1d2 Update AUTHORS
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-11-01 11:23:35 +01:00
Thomas Lauf
4a0d5f9063 Configure Dependabot for GitHub actions
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-10-19 12:27:18 +02:00
Thomas Lauf
a3eef76b43 Update GitHub checkout action to v3
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-10-16 22:53:02 +02:00
Thomas Lauf
49271c07e5 Update ChangeLog
Closes #478

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-10-16 11:41:58 +02:00
Stanisław Wysocki
718531f0a8 Update documentation on XDG Base Directory specification support
Signed-off-by: Stanisław Wysocki <garethel@protonmail.com>
2022-10-16 10:52:53 +02:00
Stanisław Wysocki
04822aa195 Use XDG Base Directories compliant dirs on Unix for new installations
Signed-off-by: Stanisław Wysocki <garethel@protonmail.com>
2022-09-27 23:33:43 +02:00
Thomas Lauf
598ddb24c8 Fix typo
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-09-27 23:33:43 +02:00
Thomas Lauf
8103d49e52 Use double quotes
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-09-27 23:33:43 +02:00
Thomas Lauf
601050ae1f Quote filename
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-09-27 23:33:43 +02:00
Thomas Lauf
de17a067dc Use angle brackets in includes
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-09-27 23:33:43 +02:00
Thomas Lauf
9d3247ed40 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-09-27 23:33:43 +02:00
Thomas Lauf
23028bacb8 Remove stray entry
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-09-15 12:48:45 +02:00
Los Patchos
c2f6e7ef77 Clarify 255 RC in report docs
Signed-off-by: Los Patchos <44246129+lospatchos@users.noreply.github.com>
2022-09-14 22:13:11 +02:00
Los Patchos
74a3d94f12 Return report exit code.
Continues to throw an exception and to return 255 if no output is produced.

Signed-off-by: Los Patchos <44246129+lospatchos@users.noreply.github.com>
2022-09-14 22:13:11 +02:00
Thomas Lauf
cbf87fc42e Clang-Tidy: Use emplace_back instead of push_back
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-09-14 22:12:44 +02:00
Shaun Ruffell
478e62db51 Update libshared to 47c3262fa97c4b69542040d39be6c516c38d0e57
Needed to allow database to be kept on some network filesystems
(GothenburgBitFactory/libshared#70).

fixes #465
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2022-08-19 12:45:17 +02:00
Thomas Lauf
69fc14af0b Make getAnnotation() const
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 21:24:57 +02:00
Thomas Lauf
d256580c4e Fix typos
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 21:23:43 +02:00
Thomas Lauf
79a02f73ca Make timew summary display open intervals with future start time
Closes #491

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 21:12:13 +02:00
Thomas Lauf
a6322b4d71 Use python 10 on macOS runners
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 20:44:45 +02:00
Thomas Lauf
7cad6c21ca Fix workflow run command
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 20:26:13 +02:00
Thomas Lauf
ad5a1b851d Replace deprecated macOS runner
See https://github.com/actions/runner-images/issues/5583

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 20:23:37 +02:00
Thomas Lauf
21a01dd3bc Fix CentOS 8 Dockerfile
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 20:02:12 +02:00
Thomas Lauf
7c316b2ae1 Abort initialization if user does not confirm creation of new database
Fixes #489

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-08-17 07:46:23 +02:00