Commit graph

1883 commits

Author SHA1 Message Date
Thomas Lauf
61e5540ad2 Add 'retag' to command listing in internal help
Closes #600

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-04-26 17:00:39 +02:00
Thomas Lauf
7007e16819 Restore quoting of tags with hyphen
Closes #580 #582

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-01-16 13:35:02 +01:00
Thomas Lauf
05ccf7b737 Fix range determination when filtering by ids
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-24 18:28:20 +01:00
Thomas Lauf
76b3dfaa8b Fix compile error on Linux
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-24 12:35:22 +01:00
Thomas Lauf
ea95ca8a70 Update copyright ranges
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-23 23:14:46 +01:00
Thomas Lauf
bf683eedbf Filter summary based on ids
Closes  #573

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-23 22:38:31 +01:00
Thomas Lauf
82ca6d4027 Fix linker warning on duplicate libraries
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-23 22:38:31 +01:00
Thomas Lauf
7b4a234f03 Unify coding style
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-23 22:38:31 +01:00
Thomas Lauf
159b8c642a Remove hyphen from list of items triggering quoting
Closes #576

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-23 13:08:05 +01:00
Thomas Lauf
f0b89239a7 Quote also the first entry of list
Relates to #576

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-23 13:08:05 +01:00
Thomas Lauf
a347ed1f1a Use template for joinQuotedIfNeeded
Unify versions for std::set and std::vector

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-23 13:08:05 +01:00
Thomas Lauf
054af9c1e9 Remove restriction for annotation display
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-31 10:07:37 +01:00
Thomas Lauf
b1c5d1c945 Set table width to current width of terminal
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-31 10:07:37 +01:00
Thomas Lauf
d74184f46b Extract creation of summary table into SummaryTableBuilder
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-31 10:07:37 +01:00
Thomas Lauf
65985bcd37 Extract creation of tags table into TagsTableBuilder
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-31 10:07:37 +01:00
Thomas Lauf
8b7298373d Extract creation of gaps table into GapsTableBuilder
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-31 10:07:37 +01:00
Thomas Lauf
03dc41e135 Extract creation of extensions table into ExtensionsTableBuilder
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-31 10:07:37 +01:00
Thomas Lauf
42c6662476 Use 'table' as variable name
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-25 10:48:34 +02:00
Thomas Lauf
7f24324b82 Fix formatting
- Add braces
- Fix indentation
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-25 10:48:34 +02:00
Thomas Lauf
40e6c4adaf Use 'sonw' instead of 'eow'
With GothenburgBitFactory/taskwarrior#2519, all 'end of *' named dates have been changed to be the last minute of the respective date.
This caused the ':lastweek' hint to miss the last day of its range.

Closes #493

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-10 13:04:47 +02:00
Thomas Lauf
0b641da598 Add ":today" hint
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-10 13:04:47 +02:00
Thomas Lauf
b6f6457b6c Sort hints
Mainly alphabetically, but group complementary hints, and put weekday hints at end

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-10 13:04:47 +02:00
Thomas Lauf
c43342d8ff Update libshared to 35e6ec09595c80bc744a27eda50e4dd34d6c7303
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-09 17:29:24 +02:00
Thomas Lauf
6d79ea4a6d Update copyright statements
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-09-18 12:33:17 +02:00
Thomas Lauf
a7d2cdc2b2 Update libshared to a2475a1fa417915d6eb4dc615dc8941b4f140135
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-09-13 15:15:54 +02:00
Thomas Lauf
8e96ad5229 Add functions to add/remove a set of tags to/from an interval
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-08-11 19:25:47 +02:00
Thomas Lauf
bddb874034 Improve configurability of CMake install directories
Make installation of man pages configurable per section
Use configuration variable TIMEW_BINDIR
Update documentation

Closes #553

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-08-11 15:30:26 +02:00
Iúri Archer
4469e9056a
Add retag command (#551)
Closes #515 

---------

Signed-off-by: cyberme0w <iuri_archer@hotmail.com>
2023-07-31 22:45:08 +02:00
Tadeas Uhlir
ae5f8fc279 Make XDG base dirs work on all UNIX like systems
Signed-off-by: Tadeas Uhlir <tadeas.uhlir@gmail.com>
2023-07-29 15:40:41 +02:00
Shaun Ruffell
7a75210ce1 AtomicFile: Operate on the target of symlinks
Currently, if an AtomicFile is opened on a symlink, the AtomicFile would
end up overwriting the link. This change makes AtomicFiles operate on
the targets of the links and not the links themselves.

```
$ test/AtomicFileTest
1..22
ok 1 - AtomicFileTest: Shall not exists before finalize
ok 2 - AtomicFileTest: Shall exists after finalize
ok 3 - AtomicFileTest: Shall have the correct data
ok 4 - AtomicFileTest: Neither shall exist before finalize
ok 5 - AtomicFileTest: Both shall exists after finalize
ok 6 - AtomicFileTest: First file shall contain the correct data
ok 7 - AtomicFileTest: Second file shall contain the correct data
ok 8 - AtomicFileTest: Appending does not update original before finalize
ok 9 - AtomicFileTest: Finalizing updates the appended data
ok 10 - AtomicFileTest: Read from Atomicfile
ok 11 - AtomicFileTest: Read from Atomicfile should read unfinalized data
ok 12 - AtomicFileTest: Two AtomicFiles should access same temp file (part 1)
ok 13 - AtomicFileTest: Two AtomicFiles should access same temp file (part 2)
ok 14 - AtomicFileTest: Two AtomicFiles should access same temp file (part 3)
ok 15 - AtomicFileTest: File not removed before finalize
ok 16 - AtomicFileTest: File is removed after finalize
ok 17 - AtomicFileTest: writes to symlinks end up in target
ok 18 - AtomicFileTest: shall maintain symlink
ok 19 - AtomicFileTest: AtomicFile::write_raw throws on error # skip
ok 20 - AtomicFileTest: AtomicFile::finalize_all() throws on error # skip
ok 21 - AtomicFileTest: AtomicFile::reset clears failure state # skip
ok 22 - AtomicFileTest: AtomicFile::append throws on error # skip
ok 23 - AtomicFileTest: AtomicFile::append did not partially fill the file. # skip
ok 24 - AtomicFileTest: AtomicFile::append failures prevent finalization # skip
```

Fixes #546

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2023-06-23 17:35:00 +02:00
Thomas Lauf
34bba44d38 Replace CLI::getFilter by CLI::getRange and CLI::getTags
- Add CLI::getRange
- Make CLI::getTags return a set instead of a vector. This has the side effect that the tags are sorted now...
- Replace variable 'filter' by 'range' and 'tags'. Variable 'filter' was just a wrapper, better use the components directly
2023-06-17 14:19:02 +02:00
Thomas Lauf
77fb1851a7 Fix grammar and spelling
Use notations 'Clang'/'GCC', 'Asciidoctor', 'Make', 'Git', 'CMake' when referring to the tool, not the command

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 14:19:02 +02:00
Thomas Lauf
9299fd3e39 Apply Clang-Tidy
Use emplace_back instead of push_back
Use 'nullptr'
Use function 'empty ()' instead of 'size () == 0'
Mark single-argument constructors as 'explicit'
Call static function correctly
2023-06-17 14:19:02 +02:00
Thomas Lauf
2535c2c399 Cleanup includes
- Remove unused includes
- Use '<..>' style consistently
- Strip any paths from include
- Replace deprecated C++ headers
- Sort includes according to LLVM rules
  https://llvm.org/docs/CodingStandards.html#include-style

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 14:19:02 +02:00
Thomas Lauf
3008e458e9 Update project to C++17
- Bump CMake to minimum version 3.8
- Set C++ standard to 17
- Remove CMAKE_LEGACY_CYGWIN_WIN32 compatibility mode
- Remove C++11 stuff
- Update documentation

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 08:41:07 +02:00
Thomas Lauf
20a8a4a4cc Cleanup CMake files
- Replace tabs with spaces
- Use lowercase for CMake commands
- Unify alignment
- Remove superfluous empty line
- Add space after CMake command

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-05-26 09:53:03 +02:00
Thomas Lauf
12c089aee1 Fix wording
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-18 23:18:43 +02:00
Maxim Beder
f4085904ee Fix summary truncating long annotations
Fixed summary truncating annotations which are too long and consisting
of multibyte characters, by using UTF8 aware functions for measuring
length of the string and takeing a substring.

Signed-off-by: Maxim Beder <macsim.beder@gmail.com>
2023-04-14 12:23:16 +02:00
Thomas Lauf
082708a7ca Fix typos and wording
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-04 22:44:44 +02:00
Thomas Lauf
14bed139f6 Update copyrights
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-04 22:44:44 +02:00
Thomas Lauf
fd1e26eff3 Add configurable default range for report 'gaps'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-02 18:50:35 +02:00
Thomas Lauf
c6130157c6 Specify ranges without ':' in configuration
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-02 18:50:35 +02:00
Thomas Lauf
f9ca6c6f5e Make display of columns for week number and day of week configurable
Closes #389

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 18:06:07 +01:00
Thomas Lauf
3c6caff67b Show error message if command track is called with an id
Closes #439

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 14:24:37 +01:00
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
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