Compare commits

...

492 commits

Author SHA1 Message Date
Thomas Lauf
d925553116 Prevent the CLI to canonicalize the binary
Some checks failed
tests / tests (alpine-edge, Alpine Edge, ubuntu-latest) (push) Has been cancelled
tests / tests (alpine-latest, Alpine Latest, ubuntu-latest) (push) Has been cancelled
tests / tests (archlinux, Archlinux Base, ubuntu-latest) (push) Has been cancelled
tests / tests (centos-stream9, Centos Stream9, ubuntu-latest) (push) Has been cancelled
tests / tests (debianstable, Debian Stable, ubuntu-latest) (push) Has been cancelled
tests / tests (debiantesting, Debian Testing, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora41, Fedora 41, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora42, Fedora 42, ubuntu-latest) (push) Has been cancelled
tests / tests (opensuseleap, OpenSUSE Leap, ubuntu-latest) (push) Has been cancelled
tests / tests (opensusetumbleweed, OpenSUSE Tumbleweed, ubuntu-latest) (push) Has been cancelled
tests / tests (osx-13, macOS 13, macos-13) (push) Has been cancelled
tests / tests (osx-14, macOS 14, macos-14) (push) Has been cancelled
tests / tests (osx-15, macOS 15, macos-15) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 22.04, ubuntu-latest) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 24.04, ubuntu-latest) (push) Has been cancelled
For one, it is not necessary: the first argument on the command line is not used any
further when executing the command line. Also, if there is an extension that starts
with the same string as the binary, the binary gets also marked as an extension.
This in turn prohibits the detection of any other Timewarrior command such that e.g.
the command 'summary' in 'timew summary' is treated as an external report, which is
not present and thus makes the call fail.

Closes #677

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-06-25 19:07:42 +02:00
dependabot[bot]
d43e962c6c Bump sigstore/cosign-installer from 3.8.2 to 3.9.1
Some checks failed
tests / tests (alpine-edge, Alpine Edge, ubuntu-latest) (push) Has been cancelled
tests / tests (alpine-latest, Alpine Latest, ubuntu-latest) (push) Has been cancelled
tests / tests (archlinux, Archlinux Base, ubuntu-latest) (push) Has been cancelled
tests / tests (centos-stream9, Centos Stream9, ubuntu-latest) (push) Has been cancelled
tests / tests (debianstable, Debian Stable, ubuntu-latest) (push) Has been cancelled
tests / tests (debiantesting, Debian Testing, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora41, Fedora 41, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora42, Fedora 42, ubuntu-latest) (push) Has been cancelled
tests / tests (opensuseleap, OpenSUSE Leap, ubuntu-latest) (push) Has been cancelled
tests / tests (opensusetumbleweed, OpenSUSE Tumbleweed, ubuntu-latest) (push) Has been cancelled
tests / tests (osx-13, macOS 13, macos-13) (push) Has been cancelled
tests / tests (osx-14, macOS 14, macos-14) (push) Has been cancelled
tests / tests (osx-15, macOS 15, macos-15) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 22.04, ubuntu-latest) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 24.04, ubuntu-latest) (push) Has been cancelled
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.2 to 3.9.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.2...v3.9.1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 3.9.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-24 18:16:18 +02:00
Thomas Lauf
ae06f0526a Update download link for package downloads
Some checks failed
tests / tests (alpine-edge, Alpine Edge, ubuntu-latest) (push) Has been cancelled
tests / tests (alpine-latest, Alpine Latest, ubuntu-latest) (push) Has been cancelled
tests / tests (archlinux, Archlinux Base, ubuntu-latest) (push) Has been cancelled
tests / tests (centos-stream9, Centos Stream9, ubuntu-latest) (push) Has been cancelled
tests / tests (debianstable, Debian Stable, ubuntu-latest) (push) Has been cancelled
tests / tests (debiantesting, Debian Testing, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora41, Fedora 41, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora42, Fedora 42, ubuntu-latest) (push) Has been cancelled
tests / tests (opensuseleap, OpenSUSE Leap, ubuntu-latest) (push) Has been cancelled
tests / tests (opensusetumbleweed, OpenSUSE Tumbleweed, ubuntu-latest) (push) Has been cancelled
tests / tests (osx-13, macOS 13, macos-13) (push) Has been cancelled
tests / tests (osx-14, macOS 14, macos-14) (push) Has been cancelled
tests / tests (osx-15, macOS 15, macos-15) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 22.04, ubuntu-latest) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 24.04, ubuntu-latest) (push) Has been cancelled
2025-06-09 22:21:53 +02:00
dependabot[bot]
1fd82ec137 Bump docker/build-push-action from 6.17.0 to 6.18.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.17.0 to 6.18.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.17.0...v6.18.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 6.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 22:14:28 +02:00
Thomas Lauf
1d3dd8f440 Make display of ids and annotations the default in summary report for new users
Initialize a new 'timewarrior.cfg' file with the respective settings

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-06-01 23:39:53 +02:00
Thomas Lauf
191ad1ec8a Update test zoo docker images
* Add Fedora 42
* Remove Fedora 40
* Remove Ubuntu 20.04

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-05-31 21:43:31 +02:00
Thomas Lauf
817023f75d Update libshared to 121f757c3ec1b1f548f7835208b8c72d85d141a7
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-05-30 23:55:42 +02:00
Thomas Lauf
9b91a7ac71
Upgrade test infrastructure (#670)
* Drop Ubuntu 20.04 test runner
* Add macOS 15 test runner

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-05-30 23:42:48 +02:00
Thomas Lauf
331433c688 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-05-30 22:51:01 +02:00
Thomas Lauf
09ed1d1e22 Align id filtering of export command
Align code structure of CmdChart, CmdExport, CmdReport, CmdSummary

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-05-30 22:51:01 +02:00
Thomas Lauf
6c74f7aa3c Add id filtering to reports
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-05-30 22:51:01 +02:00
Thomas Lauf
9cc2844595 Add id filtering to charts
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-05-30 22:51:01 +02:00
dependabot[bot]
ad838354a1 Bump docker/build-push-action from 6.16.0 to 6.17.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.16.0 to 6.17.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.16.0...v6.17.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 6.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-21 08:15:39 +02:00
Karam Abu Judom
dafced21ef fix typo in URL in README.md 2025-05-05 20:41:28 +02:00
dependabot[bot]
7dc7f54d3c Bump docker/build-push-action from 6.15.0 to 6.16.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.15.0 to 6.16.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.15.0...v6.16.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 6.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-29 20:53:40 +02:00
dependabot[bot]
7158687398 Bump sigstore/cosign-installer from 3.8.1 to 3.8.2
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.1...v3.8.2)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 3.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-29 20:45:20 +02:00
Thomas Lauf
f36ad01788 Fix man page section numbers and reference formatting
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-26 19:49:10 +02:00
Thomas Lauf
e092041a38 Enter commit hash for release 1.8.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-20 21:38:42 +02:00
Thomas Lauf
2257084710 Release 1.8.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-20 19:57:23 +02:00
Thomas Lauf
549cb7ba61 Update copyright
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-19 23:00:44 +02:00
Thomas Lauf
576af3fd5f Add the sub-command range to the modify command.
Additionally, this also makes the syntax of the `modify` command more flexible.
Before, the sub-command had to follow right after the `modify` command, now one can also write it with the id between command and sub-command:
```
$ timew modify @1 start 09:30
```
The `range` sub-command modifies both start and end time of the interval. It expects a range as parameter, e.g.
```
$ timew modify @3 range 08:15 - 13:37
```

Closes #627

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-19 22:59:33 +02:00
Thomas Lauf
e5bd6f2be4 Update libshared to 2aa844cb9b015fca81b947c57fde07999ede002b
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-13 23:24:41 +02:00
Thomas Lauf
3f763c031c Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-09 18:26:24 +02:00
Thomas Lauf
861f091bbb
Fix installation of man pages from tarball
Install man pages from tar ball

The generated man pages are already present in the tar ball.
Simply install those then, even if Asciidoctor is not present.
Optimize CMake files.

Closes #620

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-04-04 23:50:37 +02:00
dependabot[bot]
278f2b065c Bump docker/login-action from 3.3.0 to 3.4.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-23 18:27:59 +01:00
Thomas Lauf
f926f7a9ca Remove outdated TODO, align description with other themes 2025-03-08 18:11:31 +01:00
dependabot[bot]
da59408463 Bump docker/build-push-action from 6.14.0 to 6.15.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.14.0 to 6.15.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.14.0...v6.15.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-05 20:00:26 +01:00
Thomas Lauf
b4a0985584 Make Docker image workflow run on any 'workflow_dispatch' events 2025-03-02 12:23:58 +01:00
dependabot[bot]
b86bfbf631 Bump sigstore/cosign-installer from 3.8.0 to 3.8.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.0...v3.8.1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 07:44:06 +01:00
dependabot[bot]
4bc16a386a Bump docker/build-push-action from 6.13.0 to 6.14.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.13.0 to 6.14.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.13.0...v6.14.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 07:43:43 +01:00
dependabot[bot]
63f5ea20dd Bump sigstore/cosign-installer from 3.7.0 to 3.8.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.7.0...v3.8.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 21:10:40 +01:00
Thomas Lauf
9dad495dee Update libshared to e19bf08450d5b054550c38eebe4980b8fc412d22 2025-02-05 23:38:28 +01:00
Thomas Lauf
11e5f941fd Update macOS test script
Do not install CMake, is already provided by GitHub runner
Upgrade PYTHON to 3.10.16
Print Asciidoctor version in info output
2025-02-05 23:29:30 +01:00
Thomas Lauf
e735c3a403 Set CMake minimum version to 3.10 2025-02-05 22:42:14 +01:00
Thomas Lauf
a406f447bb Update libshared to d98ff854cf370d3aafdeb8ee6d231ec15f026c90
- Add 24bit color support (#86)
2025-02-05 22:18:19 +01:00
dependabot[bot]
2845427ffe Bump docker/build-push-action from 6.10.0 to 6.13.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.10.0 to 6.13.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.10.0...v6.13.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-02 22:34:40 +01:00
Thomas Lauf
77f66969c5 Update test zoo
- Remove 'version' from docker-compose.yml
- Add Asciidoctor version to informative output
- Fix Asciidoctor install on OpenSUSE Tumbleweed
- Add Ubuntu 24.04 to test zoo
- Drop Ubuntu 18.04 from test zoo
- Add Fedora 40 to test zoo
- Add Fedora 41 to test zoo
- Drop Fedora 37 from test zoo
- Drop Fedora 38 from test zoo

Closes #648
2025-02-02 22:05:50 +01:00
dependabot[bot]
c0b049f469 Bump docker/build-push-action from 6.9.0 to 6.10.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.9.0...v6.10.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 23:11:34 +01:00
Thomas Lauf
89fd60fe8a Remove 'macOS 12' runner
GitHub is removing the `macOS 12` runner image by 2024-12-03
See https://github.com/actions/runner-images/issues/10721

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-11-22 21:07:12 +01:00
Thomas Lauf
70aea4b9bc Re-enable Debian Testing image
Was disabled in 4c9a39a because 'fiu-utils' was not available

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-11-22 21:07:12 +01:00
Thomas Lauf
eee650e889 Enable running tests from GitHub 2024-11-22 15:13:08 +01:00
Thomas Lauf
e5b05cbe1b Update libshared to 47a750c385133dd14a0957691fe21cbe46e80b10
- Add defines for the values that are allowed for epoch timestamps
- Fix wrong week number output when weekstart=0
- Add bold color with 256 color space
2024-11-07 13:44:13 +01:00
dependabot[bot]
d389bba72c Bump sigstore/cosign-installer from 3.6.0 to 3.7.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 23:12:38 +02:00
dependabot[bot]
8abb3c3c8e Bump docker/build-push-action from 6.7.0 to 6.9.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.7.0 to 6.9.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.7.0...v6.9.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-06 11:30:24 +02:00
Thomas Lauf
2d05922390 Update ChangeLog 2024-09-13 16:12:01 +02:00
Scott Mcdermott
05724a9d21 Make python tests use timezone, py3.12 deprecated tz-less utcnow()
Python upstream is trying to eliminate tz-naive date functions that
imply anything to do with a timezone, even UTC.  They have deprecated
datetime.datetime.utcnow() in Python 3.12 and thus running tests emits
many warnings for us.

We switch to instantiate datetime objects taht are intended to reflect
UTC to have a timezone, or if we instantiate naive ones and then later
convert, we do the full conversion.

After the changes, the tests still work on Python 3.9, but now also on
Python 3.12 without warnings.

See PR description for #632 for more details.

Signed-off-by: Scott Mcdermott <scott@smemsh.net>
2024-09-13 15:45:11 +02:00
Scott Mcdermott
05b72bba6f Use raw python strings for regex escapes in test summary
Python warns about "\d" and friends that aren't in raw quotes, so we add
the 'r'aw string-qualifier.

Signed-off-by: Scott Mcdermott <scott@smemsh.net>
2024-09-13 15:45:11 +02:00
Thomas Lauf
d502bf8ee4 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-09-13 14:29:15 +02:00
Scott Mcdermott
b9fa8c10c2 Update libshared to a63fa350413f598b3b55355a6460b7fd2efb2e69
Brings in new dayOfWeek() code from GothenburgBitFactory/libshared#81

Signed-off-by: Scott Mcdermott <scott@smemsh.net>
2024-09-13 14:27:50 +02:00
Scott Mcdermott
251c5b332a Make week number parsing conform to ISO8601 when Datetime::weekstart == 1
This is a duplicate of the changes from commit with same subject line in
GothenburgBitFactory/libshared#81 and also duplicates the commit
message below.  Timewarrior has copies of many functions from
libshared's Datetime class in its own DatetimeParser class, and until
such time as these classes are integrated, we have to maintain copies of
these functions here, and the changes need to be duplicated.  See
discussion in aforementioned PR.

The one difference with the patch over there is, this one is using the
public Datetime::dayOfWeek() and Datetime::daysInYear() methods from
libshared, rather than its own implementation.  The copy in Timewarrior
already was doing this before, but it's worth noting it's the only
difference with the corresponding patch in libshared PR 81, and only
amounts to a change in the namespace qualifier.

Copied commit message from libshared follows.

                           *     *    *

This patch makes the parsing of week numbers in dates ISO-8601 compliant
in the case that Datetime::weekstart == 1, while the existing behavior
remains available if Datetime::weekstart == 0.

The previous code parsed week numbers (given as "yyyy-Www") into dates
starting on Sunday.  Although the code had a "Datetime::weekstart"
variable, and this value was initialized to 1 (which is Monday) in
libshared, nonetheless week specifications would be parsed into calendar
days starting on Sunday.

Furthermore, week days in such given weeks ('d' in "yyyy-Www-d") used 0-6
for Sunday-Monday, while ISO8601 specifies 1-7 Monday-Sunday.
Therefore, yyyy-Www-0 was treated as valid (and should not be), while
yyyy-Www-7 was invalid (and should be valid).

Note that neither Taskwarrior nor Timewarrior ever set the value of
Datetime::weekstart.  Taskwarrior has an rc.weekstart, but this is only
used for "task calendar" output, not for parsing dates.

The patch does the following:

- Initialize "Datetime" instances with a weekday value from
  Datetime::weekstart.  This helps the case when weekday is not
  supplied, it won't default to zero and fail validation (when
  weekstart is '1').  Note that mktime() is usually used in the code
  to convert populated "struct tm" broken-down times into epoch-times,
  and this operation does not use tm.tm_wday for input, only as an
  output field, recomputed as a normalized value, so it appears to be
  safe to initialize it with a 1 (which we might wonder about since
  .tm_wday is supposed to be 0-6 Sunday based).

- Use the already-existing Datetime::parse_weekday() to parse the
  'ww' in "yyyy-Www" input dates (the function was not used by any
  caller previously; guessing it may have been intended for eventual
  use in order to respect weekstart(?))

- Teach parse_weekday() about weekstart.  Previously this assumed
  1-7, which is the reason I'm guessing this was intended to be used
  for ISO weeks eventually.  Now it can also use 0-6 if weekstart 0.

- Teach Datetime::validate to respect Datetime::weekstart also.
  Previously only 0-6 Sunday-Monday was considered valid.

- Default the weekday to Datetime::weekstart if not supplied, ie for
  "yyyy-Www-X" if the "-X" is not supplied, as recognized when
  Datetime::standaloneDateEnabled = true, which is the case for (1)
  tests, (2) timewarrior, but NOT for taskwarrior at this time
  (both the standalone 'calc' and 'task calc' (ie Context.cpp) set
  this to false).

- Implement the complete ISO week calculation algorithm in
  Datetime::resolve() if weekstart is '1', and keeps the existing
  algorithm if weekstart is '0'.  This will allow Taskwarrior and
  Timewarrior to offer the option of the old behavior for those
  who want to use Sunday-based weeks and ignore ISO week calculations
  (such as 2023-01-01 being in ISO week 2022-W52).

Signed-off-by: Scott Mcdermott <scott@smemsh.net>
2024-09-13 14:27:50 +02:00
Scott Mcdermott
78975fa651 Datetime: validate: consider dates up to year 9999 as valid
This corrects for some drift in our shadowed copy of libshared's
Datetime::validate (in our own DatetimeParser class with function of
same name), from libshared commit 7dffb13c

Signed-off-by: Scott Mcdermott <scott@smemsh.net>
2024-09-13 14:27:50 +02:00
dependabot[bot]
ceb48379bb Bump docker/build-push-action from 6.5.0 to 6.7.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.5.0 to 6.7.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.5.0...v6.7.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-17 11:10:43 +02:00
dependabot[bot]
cd60779fdc Bump sigstore/cosign-installer from 3.5.0 to 3.6.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-17 10:54:42 +02:00
Scott
dad44a2201 Add empty '.pre-commit-config.yaml'
Now needed for the CI system.

Signed-off-by: Scott <scott@smemsh.net>
2024-08-17 10:33:25 +02:00
Scott
d82d78aa82 Fix test workflow to use docker compose v2, as v1 now retired
Apparently "docker-compose" was deprecated over 6 months ago and is
starting to be phased out in favor of "docker compose".  Without this,
test runners are getting:

  home/runner/work/_temp/0af6641a-337b-4651-8ca4-fef3529091af.sh: line 1:
  docker-compose: command not found

See https://github.com/orgs/community/discussions/116610 for details

Signed-off-by: Scott <scott@smemsh.net>
2024-08-17 10:33:25 +02:00
dependabot[bot]
e27d91a903 Bump docker/build-push-action from 6.4.0 to 6.5.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.4.0...v6.5.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 20:50:52 +02:00
dependabot[bot]
d4243aaa85 Bump docker/login-action from 3.2.0 to 3.3.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 20:50:27 +02:00
dependabot[bot]
f9f9c87129 Bump docker/build-push-action from 6.3.0 to 6.4.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-20 13:47:59 +02:00
dependabot[bot]
9151ff5653 Bump docker/build-push-action from 6.2.0 to 6.3.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-11 21:11:40 +02:00
dependabot[bot]
764451fd6c Bump docker/build-push-action from 6.0.0 to 6.2.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.0.0 to 6.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.0.0...v6.2.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-30 00:29:14 +02:00
Thomas Lauf
4c9a39aa31 Pause debian-testing until fiu-utils is available
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-06-25 23:04:16 +02:00
Thomas Lauf
85d119ed98 Replace macOS 11 runner with macOS 14
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-06-25 22:50:00 +02:00
dependabot[bot]
cbc4967a6c Bump docker/build-push-action from 5.4.0 to 6.0.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.4.0 to 6.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.4.0...v6.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 08:42:07 +02:00
Thomas Lauf
a20ea5a3ff Update ChangeLog & AUTHORS
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-06-17 23:10:27 +02:00
Ian Kenney
81b62c3da0 Adding zsh completion
Signed-off-by: Ian Kenney <ianmichaelkenney@gmail.com>
2024-06-17 23:04:52 +02:00
dependabot[bot]
ad12fec6ae Bump docker/build-push-action from 5.3.0 to 5.4.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.3.0...v5.4.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11 12:58:11 +02:00
dependabot[bot]
15ec8c1c03 Bump actions/checkout from 2 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11 12:08:32 +02:00
dependabot[bot]
8a5ae6c670 Bump docker/login-action from 3.1.0 to 3.2.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 21:48:07 +02:00
Thomas Lauf
ba197c6198 Jettison centos7 and centos8 in favor of centos-stream9
CentOS 8 reached end of life on 2021-12-31 (CentOS Stream8 on 2024-05-31)
CentOS 7 reaches end of life on 2024-06-30

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-06-05 20:26:22 +02:00
Thomas Lauf
57c9926af9 Update Fish completion to 1c3624015ee9aaba55f3b96851cc8e120a82545a 2024-06-05 18:42:50 +02:00
Thomas Lauf
25185bcdb8 Use PAT for trigger request
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-06-05 18:24:19 +02:00
Matt Smida
96f41b4d7f Add update-docs workflow
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-06-04 21:32:13 +02:00
Tobias Predel
ca3e3f8582 Remove custom linkstyle
Signed-off-by: Tobias Predel <tobias.predel@gmail.com>
2024-05-27 10:05:44 +02:00
Tobias Predel
ceb369508d Fix manual page formatting
Remove brackets in manual page

Signed-off-by: Tobias Predel <tobias.predel@gmail.com>
2024-05-27 10:05:44 +02:00
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
dependabot[bot]
fe1f7a9d63 Bump sigstore/cosign-installer from 3.4.0 to 3.5.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-21 18:26:36 +02:00
dependabot[bot]
90f4134e48 Bump docker/login-action from 3.0.0 to 3.1.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 22:54:59 +01:00
dependabot[bot]
0e5f0e317f Bump docker/build-push-action from 5.2.0 to 5.3.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 22:54:40 +01:00
dependabot[bot]
51b54795a6 Bump docker/build-push-action from 5.1.0 to 5.2.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 23:28:45 +01:00
dependabot[bot]
e55a1bfff4 Bump sigstore/cosign-installer from 3.3.0 to 3.4.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 23:04:12 +01:00
Thomas Lauf
74562b2d47 Fix open suse Docker images
Update Asciidoctor

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-02-27 22:25:45 +01:00
Thomas Lauf
9f8b0fbc28 Enter commit hash for release 1.7.1
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-01-16 21:26:51 +01:00
Thomas Lauf
2514d506b5 Release 1.7.1
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-01-16 13:35:02 +01: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
f24b297541 Tweak output of macOS test script
- "hide" grep statement
- remove superfluous version information for python3

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-01-13 18:57:49 +01:00
Thomas Lauf
980a8be58b Update ChangeLog, AUTHORS
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2024-01-13 18:57:49 +01:00
Joachim Meyer
c9a3a785b8 README - Update build instructions
A freshly cloned repository also needs a call to create and update the required submodule

Signed-off-by: Joachim Meyer <dev@joachim-meyer.com>
2024-01-13 18:51:52 +01:00
Thomas Lauf
5b5b68f153 Enter commit hash for release 1.7.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-24 21:11:17 +01:00
Thomas Lauf
63f7fc95a0 Release 1.7.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-24 19:45:20 +01:00
Thomas Lauf
bcc78a941f Update test zoo
- Unify test setup in Docker files
- Add Fedora 38 Docker image
- Add OpenSUSE Leap Docker image
- Add OpenSUSE Tumbleweed Docker image
- Drop Fedora 36 Docker image
- Drop OpenSUSE 15 Docker image

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-24 19:26:50 +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
491a195cbc Fix test name
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-12-24 14:35:08 +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
f2e11a0d2d Update task-timewarrior-hook script to 87a3426d8153f92aaee2edf36b2de62e48c4de0e 2023-12-22 23:13:13 +01:00
dependabot[bot]
53a9b8f393 Bump sigstore/cosign-installer from 3.2.0 to 3.3.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-12 19:02:29 +01:00
dependabot[bot]
abee1a1f4f Bump docker/build-push-action from 5.0.0 to 5.1.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 08:32:36 +01:00
dependabot[bot]
6f1105b29d Bump sigstore/cosign-installer from 3.1.2 to 3.2.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.1.2 to 3.2.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.1.2...v3.2.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-14 15:09:27 +01:00
Thomas Lauf
446afd0818 Update ChangeLog, AUTHORS
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-31 11:35:38 +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
910acafbc0 Use '```' to mark code blocks
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-29 14:45:21 +01:00
Thomas Lauf
a73b57ce50 Arch Linux repository 'community' is now 'extra'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-29 14:30:02 +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
67c5b7de6c Refactor UnitTest class
- Use UnitTest::ok in UnitTest::notok
- Extract report_* functions
- Extract common color function and constants
- Use templates to reduce code duplication
2023-10-14 19:44:27 +02:00
Thomas Lauf
9c49d4df2d Update bash completion
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-13 15:59:14 +02:00
Thomas Lauf
fd9ee0f780 Refactor holidays/refresh script
- Use double quotes only
- Optimize imports
- Extract function gather_locales
- Update help text

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-10-10 19:00:45 +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
dependabot[bot]
2fb71d9af0 Bump docker/login-action from 2.2.0 to 3.0.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-22 20:12:06 +02:00
dependabot[bot]
31339ca77d Bump docker/build-push-action from 4.2.1 to 5.0.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.2.1 to 5.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.2.1...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-22 20:11:48 +02:00
Thomas Lauf
2fee9f6592 Enter commit hash for release 1.6.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-09-18 13:19:37 +02:00
Thomas Lauf
1882058c5e Release 1.6.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-09-18 12:33:17 +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
dependabot[bot]
6b73a64dab Bump docker/build-push-action from 4.1.1 to 4.2.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 4.2.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v4.2.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 15:42:56 +02:00
dependabot[bot]
86b455ae42
Bump actions/checkout from 3 to 4 (#557) 2023-09-05 16:12:17 +02:00
dependabot[bot]
df9112cee4
Bump sigstore/cosign-installer from 3.1.1 to 3.1.2 (#556) 2023-09-05 16:11:56 +02:00
Thomas Lauf
a72659f753 Move test for 'untag' from 'tag.t' to 'untag.t'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-08-11 20:50:29 +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
c2c4691a23 Add macOS 13 test runner
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-08-11 15:51:07 +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
Thomas Lauf
be0243ba1a Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-08-04 23:17:03 +02:00
quazgar
32ac226fec
DOC: Update docs. (#554)
Signed-off-by: Quazgar <quazgar@posteo.de>
2023-08-04 23:14:53 +02:00
Thomas Lauf
5dc9925cde Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-07-31 22:49:05 +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
Thomas Lauf
a2374fb67b Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-07-29 15:45:01 +02:00
Tadeas Uhlir
edcc9b102d Fix documentation since macOS is now supported
Signed-off-by: Tadeas Uhlir <tadeas.uhlir@gmail.com>
2023-07-29 15:40:41 +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
dependabot[bot]
bcf466eb37 Bump sigstore/cosign-installer from 3.1.0 to 3.1.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 23:30:01 +02:00
dependabot[bot]
4a3171e3da Bump sigstore/cosign-installer from 3.0.5 to 3.1.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.5 to 3.1.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.5...v3.1.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 11:44:34 +02:00
Thomas Lauf
04dc8f36e7 Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-23 20:06:22 +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
Shaun Ruffell
c67a4715f8 AtomicFileTest: Fix test output to be test/problems --details compliant
Before this change, when AtomicFileTest had errors, there was no match for details:
```
$ test/problems --details test/all.log
Traceback (most recent call last):
  File "test/problems", line 145, in <module>
    details_errors[filename] += " - " + detail.match(line).group(1) + "\n"
AttributeError: 'NoneType' object has no attribute 'group'
```

Now the details are pulled out properly:
```
$ test/problems --details test/all.log
Failed:
AtomicFile.t (2):
 - AtomicFile::write_raw throws on error
 - AtomicFile::finalize_all() throws on error

Unexpected successes:

Skipped:

Expected failures:
```

Why these tests are failing on this particular host is a matter for another time...

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2023-06-23 17:35:00 +02:00
dependabot[bot]
620ae1ad8e Bump docker/build-push-action from 4.1.0 to 4.1.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 14:14:20 +02:00
Thomas Lauf
82bcfafa21 Use term 'macOS' instead of 'OS-X'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 15:17:29 +02:00
Thomas Lauf
26f2791d6b Set correct application name in test suite run script
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 14:19:02 +02:00
Thomas Lauf
c6aa8815a2 Make CMake/Make signal start of test suite run
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 14:19:02 +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
0c84dfd42e Remove reference to 'TIMEW_RCDIR'
Copy paste from Taskwarrior, not used in Timewarrior

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 14:19:02 +02:00
Thomas Lauf
ce68d43305 Update holidays/README
- Add links to holidata.net
- Reformat shell command examples

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-17 14:19:02 +02:00
Thomas Lauf
f346142560 Fix output redirection
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
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
dependabot[bot]
6c287870dd Bump docker/build-push-action from 4.0.0 to 4.1.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 14:29:29 +02:00
dependabot[bot]
7b6510ddb8 Bump docker/login-action from 2.1.0 to 2.2.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 14:29:13 +02:00
Thomas Lauf
213798a29a Update AUTHORS, ChangLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-06-08 17:33:14 +02:00
Benedikt Fein
dd330aa0db Fix man page build for out-of-source builds
Fixes #461

Signed-off-by: Benedikt Fein <fein@fim.uni-passau.de>
2023-06-08 17:29:05 +02:00
Thomas Lauf
814956b920 Update README.md for shell completions
- Add repository and license for fish completion
- Beautify repository URLs
- Updated texts

Relates to #535

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-05-29 16:42:44 +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
81bc57309b Unify wording
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-05-26 09:30:11 +02:00
Thomas Lauf
660966dc9f Update ChangeLog, AUTHORS
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-05-26 09:28:07 +02:00
Thomas Lauf
aa73688ed4 Update README.md for shell completions
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-05-26 09:27:24 +02:00
Povl Filip Sonne-Frederiksen
fc6aab7d8b Adding fish shell completion
Signed-off-by: Povl Filip Sonne-Frederiksen <22501790+pfmephisto@users.noreply.github.com>
2023-05-26 09:15:53 +02:00
Thomas Lauf
6a5789140e Update ChangeLog, AUTHORS
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-05-26 09:12:23 +02:00
Ankur Sinha (Ankur Sinha Gmail)
834af86d5b fix(totals.py): correct handling of report end when it is available
Signed-off-by: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
2023-05-26 08:51:13 +02:00
Ankur Sinha (Ankur Sinha Gmail)
99d18f42bb fix(totals.py): return all info when no arguments are provided
Signed-off-by: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
2023-05-26 08:51:13 +02:00
Ankur Sinha (Ankur Sinha Gmail)
75d037d353 fix(totals.py): end report at current time if a task is being tracked
Fixes #540

Signed-off-by: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
2023-05-26 08:51:13 +02:00
dependabot[bot]
00a2bf55da Bump sigstore/cosign-installer from 3.0.3 to 3.0.5
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.3 to 3.0.5.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.3...v3.0.5)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 13:50:50 +02:00
dependabot[bot]
84fdf76f9a Bump sigstore/cosign-installer from 3.0.2 to 3.0.3
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-02 22:14:22 +02:00
Thomas Lauf
12c089aee1 Fix wording
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-18 23:18:43 +02:00
Thomas Lauf
38cf5aa6f4 Fix <br> tag
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-18 23:18:43 +02:00
Thomas Lauf
5b87c962e7 Polish up bash scripts
- Use '-n' instead of '! -z'
- Quote all the things...
- Enclose variable references in '{}'

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-18 23:18:43 +02:00
Thomas Lauf
14d364bff7 Drop unused assignments
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-17 08:17:29 +02:00
Thomas Lauf
81225722aa Remove stuff for Python < 3.7
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-17 08:17:29 +02:00
Thomas Lauf
2a73e3bc77 Add quotes to soothe spell checker
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-17 08:17:29 +02:00
Thomas Lauf
a1d418a686 Fix grammar and spelling
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-17 08:17:29 +02:00
Thomas Lauf
0d56d1c790 Apply 'one sentence, one line'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-17 08:17:29 +02:00
Thomas Lauf
a30a2a1a8b Fix typo
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-17 08:17:29 +02:00
Thomas Lauf
b7ffa3ad5d Use GitHub flavored Markdown to center text
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-16 19:28:00 +02:00
Thomas Lauf
1bfeb60988 Add 'alt' attribute to image, replace deprecated attribute 'align'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-16 19:24:56 +02:00
Thomas Lauf
b5832d7991 Fix numbering in Markdown file
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-16 19:24:56 +02:00
Thomas Lauf
3e5e926ea7 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-14 14:51:26 +02:00
Thomas Lauf
c8a85850ea Update branch names in CONTRIBUTING.md
Main development branch is 'develop'.
Branch 'stable' always points to the latest release.

Closes #531

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-14 14:48:45 +02:00
Thomas Lauf
70a1082224 Use local man pages in tests
We need to set the value of `MANPATH` to the local man pages when running helper function 'run_cmd_wait_nofail'.
Use the already set Timewarrior environment for this.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-14 13:50:35 +02:00
Thomas Lauf
57695d27f4 Update ChangeLog, AUTHORS
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-14 12:32:14 +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
Maxim Beder
68d4978b7d Add test for summary truncating long anotations
When calling summary command with :annotations hint, if the annotation
is longer than a certain length, it's going to be truncated. The issue
is that the length and truncation are done on a raw string without
considering UTF8 multibyte characters, so there are edge cases when an
annotation is truncated in the middle of a character creating an invalid
UTF8 string.

Added a test case for this scenario.

Signed-off-by: Maxim Beder <macsim.beder@gmail.com>
2023-04-14 12:23:16 +02:00
dependabot[bot]
c85e0c01ca Bump sigstore/cosign-installer from 3.0.1 to 3.0.2
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-12 20:31:12 +02:00
Thomas Lauf
c35ab51736 Enter commit hash for release 1.5.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-04 23:35:38 +02:00
Thomas Lauf
3acf704195 Prepare for release 1.5.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-04 22:44:44 +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
c48f595661 Change Discord invite link point directly to the Timewarrior channel
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-02 21:51:27 +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
edfabcc1e5 Update on-modify.timewarrior to 360fc2292a5eab46cd5c9bdd4cc791b6f9ea5e9a
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-03-24 20:46:37 +01:00
Thomas Lauf
123632a806 Add link to dedicated repository for on-modify.timewarrior hook
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-03-19 22:56:51 +01:00
dependabot[bot]
087d2cc3d4 Bump sigstore/cosign-installer from 2.8.1 to 3.0.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 2.8.1 to 3.0.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v2.8.1...v3.0.1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 19:33:16 +01:00
dependabot[bot]
d935701687 Bump docker/build-push-action from 3.3.0 to 4.0.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.3.0 to 4.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.3.0...v4.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-05 17:55:13 +01:00
dependabot[bot]
d6cd1df330 Bump docker/build-push-action from 3.2.0 to 3.3.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-17 19:06:55 +01:00
Thomas Lauf
1489367042 Document limitation when using a named date as range end
Closes #421

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-16 23:32:26 +01:00
Thomas Lauf
2d7dd35bd5 Update man pages for annotation command and summary report
Closes #444

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-14 21:20:56 +01:00
Thomas Lauf
016d3a99e7 Update Ubuntu docker images
- Remove no longer supported version
- Add current version

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-14 00:16:09 +01:00
Thomas Lauf
62863d0443 Convert repository owner to lowercase for GHCR
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-13 23:42:17 +01:00
Thomas Lauf
fd380acf9b Update Fedora docker images
- Remove no longer supported versions
- Add current versions

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-13 23:04:21 +01:00
Thomas Lauf
8b865eac81 Use github.repository_owner instead of github.actor
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-13 22:46:01 +01:00
Thomas Lauf
ba0514543f Update Fedora docker images
- Remove no longer supported versions
- Add current versions

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-13 22:41:13 +01:00
Thomas Lauf
84c65f0324 Fix spelling
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-07 18:58:42 +01:00
Thomas Lauf
ca5de02c56 Add workflow for Timewarrior Docker image
The workflow is triggered by a successful run of the test suite and creates a Docker image with a Timewarrior installation of the current branch (restricted to develop/stable)

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-05 23:20:00 +01:00
Thomas Lauf
246af8acfd Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-31 22:22:49 +01:00
Thomas Lauf
55ad661e0d Add tests for configurable report range, update man page
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-31 22:22:49 +01:00
Thomas Lauf
c8eee25f5b Update AUTHORS, ChangeLog
Closes #406

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-30 00:23:16 +01:00
Thomas Lauf
47b9fa8e9c Move details on POSIX time to section NOTES
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-30 00:16:00 +01:00
Daniel Hornung
cb7f439022 DOC: Added additional information about minimum posix time.
Signed-off-by: Daniel Hornung <d.hornung@indiscale.com>
2022-12-30 00:02:25 +01:00
Daniel Hornung
49f389ef8c DOC: Man page now says that POSIX time is at least 315532800.
Signed-off-by: Daniel Hornung <d.hornung@indiscale.com>
2022-12-30 00:00:12 +01:00
Thomas Lauf
2a8976d2b7 Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 23:24:24 +01:00
xerus2000
5994c7b4ce Update README 2022-12-29 23:15:10 +01:00
xerus2000
c8069d7cd7 Adjust man page 2022-12-29 23:15:10 +01: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
a5194c5b2e Update documentation on dates and durations
Relates to #252

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 16:20:03 +01:00
Thomas Lauf
817bc492a3 Fix synopsis
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 15:36:59 +01:00
Thomas Lauf
7a020a3384 Replace Markdown syntax with AsciiDoc syntax
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 15:33:38 +01:00
Thomas Lauf
f3ed2f1554 Update documentation on annotation command
Relates to #266

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-12-29 15:30:47 +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
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
Thomas Lauf
8ba588dc24 Remove obsolete function subset (with Interval)
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-09 12:00:56 +01:00
Thomas Lauf
be5607bb8e Remove obsolete function getIntervalsByIds
- Was replaced by interval filter IntervalFilterAllWithIds in 9968b9e9

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-09 11:53:34 +01:00
Thomas Lauf
993ae85d5c Add check whether requested intervals have been found when searching by ID
- Restores behaviour which got lost when switching to the new interval filtering in 9968b9e9
- Add test for each command

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-09 11:43:56 +01:00
Thomas Lauf
c2e26a989e Fix test description
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-05 23:44:12 +01:00
Thomas Lauf
6cf52faeb6 Update libshared to 072e0e0cb91c1e05e02db59ed83924b43e992938
With 179a6153, all 'end of' named dates point to the last second of the respective interval.
(see GothenburgBitFactory/taskwarrior#2519)
Redefine hint intervals in Timewarrior by 'start of' named dates, such that their ranges comprise the full interval as expected.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-05 23:42:19 +01:00
Thomas Lauf
f616b77bba Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-03 23:24:40 +01:00
Thomas Lauf
8ab44ba5e5 Skip empty intervals when flattening
Closes #403

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-03 23:15:16 +01:00
Thomas Lauf
4044635e08 Add complementary hint :holidays/no-holidays
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:48:03 +01:00
Thomas Lauf
1a6d5cacca Make summary output configurable via rules
- add config `reports.summary.ids` to toggle display of IDs
- add config `reports.summary.annotations` to toggle display of annotations
- add hints `:no-ids` and `:no-annotations` to override positive configs

Closes #474

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:48:03 +01:00
Thomas Lauf
b40f28ca4a Add braces to for and if statement
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:48:03 +01:00
Thomas Lauf
fe3c69ef20 Rename variable to show_annotations
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:48:03 +01:00
Thomas Lauf
4b483bab56 Rename variable to show_ids
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:48:03 +01:00
Thomas Lauf
17f9e8727c Add curly braces to if-statements
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:40:38 +01:00
Thomas Lauf
592f4b8b6e Apply 'one sentence, one line' to some comments
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:35:55 +01:00
Thomas Lauf
ac2e94064f Fix padding in case single digit weeks are present
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-02 15:34:33 +01:00
Thomas Lauf
1d07ec4aea Add comma
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-01 14:27:51 +01:00
Thomas Lauf
8efb716fbf Fix typo
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-01 14:27:35 +01:00
Thomas Lauf
4ac1fd39c9 Remove duplicate line
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2022-01-01 14:26:39 +01:00
Thomas Lauf
d5773b456e Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-06 08:31:03 +01:00
Shaun Ruffell
6f0181d953 Do not leak filter in IntervalFilterFirstOf
This is a continuation of 285aa7171e, and should have been part
of that commit.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-12-06 08:30:38 +01:00
Thomas Lauf
9e748d44e7 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-03 23:01:19 +01:00
Shaun Ruffell
285aa7171e Do not leak IntervalFilters in IntervalFilterAndGroup
This eliminates the use of the naked "new" so that when the filters object is
destroyed, the filters are also freed.

This also eliminates a potential issue with binding an r-value reference to a
Range as a reference in IntervalFilterAllInRange.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-12-03 22:57:52 +01:00
Thomas Lauf
7234b990d7 Update ChangeLog
Closes #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:17 +01:00
Thomas Lauf
40d0c656e7 Replace getLatestInterval by new interval filtering
Replace in commands CmdAnnotate, CmdDefault, CmdContinue, CmdTag, and CmdUntag
Also in function domGet

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:16 +01:00
Thomas Lauf
9cd693d55d Use filter IntervalFilterFirstOf in CmdContinue
Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:16 +01:00
Thomas Lauf
244b351118 Add interval filter IntervalFilterFirstOf
A first-of interval filter is done when the first matching interval has been found.

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:16 +01:00
Thomas Lauf
9968b9e9d1 Replace function getIntervalsByIds by getTracked with new filtering
Replace getIntervalsByIds in commands CmdAnnotate, CmdContinue, CmdDelete,
CmdJoin, CmdLengthen, CmdModify, CmdMove, CmdResize, CmdShorten, CmdSplit,
CmdTag, and CmdUntag

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:15 +01:00
Thomas Lauf
5f96fd2878 Add interval filter IntervalFilterAndGroup
An and-group interval filter accepts all intervals which are accepted by all filters in its group.
It is done, if one of the filters in its group is done.

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:15 +01:00
Thomas Lauf
c546add03f Use new filtering in getTracked
Replace getTracked in commands CmdSummary, CmdChart, CmdExport, CmdFill,
CmdReport, CmdTags, and CmdContinue. Also in  functions domGet and autoFill

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:15 +01:00
Thomas Lauf
a7e2d8c08c Add interval filter IntervalFilterAllWithIds
An id-set interval filter accepts all intervals, which contain all ids of the given id set.
This filter is done when all ids have been found.

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:14 +01:00
Thomas Lauf
51bbb71708 Add interval filter IntervalFilterAllInRange
An all-in-range interval filter accepts all intervals which intersect with the given range.
This filter is done if it encounters an interval with an end datetime before its range's start datetime.

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:14 +01:00
Thomas Lauf
c789de7c4e Add interval filter IntervalFilterAllWithTags
An all-with-tags interval filter accepts all intervals which contain all tags of the given tag set.
This filter is never done, i.e. it will consume all intervals from the stream.

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:14 +01:00
Thomas Lauf
94f3077a4b Add abstract base class IntervalFilter
Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:13 +01:00
Thomas Lauf
e4eeca6755 Remove version constraint from fiu-utils and libfiu-dev
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 21:32:20 +01:00
Thomas Lauf
8d1b89db30 Improve performance-plot script
- Add option to select commands for display
- Use name of data directory as plot title

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-19 23:20:25 +01:00
Thomas Lauf
b87f4a1f5c Fix performance test for command stop
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-19 22:35:37 +01:00
Thomas Lauf
77d4728a09 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-14 12:59:38 +01:00
Lim Ding Wen
82b7e5537d SummaryColors: Fix formatting
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-12 22:15:05 +01:00
Lim Ding Wen
026ef7268f SummaryColors: Handle tags with no user-set colors
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-12 22:15:05 +01:00
Lim Ding Wen
aa08d0a3f2 SummaryColors: Add colors to summary
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-12 22:15:05 +01:00
Thomas Lauf
e90e243496 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 22:14:17 +01:00
Thomas Lauf
07d0dc0a98 Do not add empty exclusion ranges to list
Closes #466

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 21:59:25 +01:00
Thomas Lauf
d54df087cb Add braces to if- and for-statements
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 21:59:23 +01:00
Thomas Lauf
11a57e3cc5 Improve timemachine test-script
- Fix `--fail-at-end` option
- Collect errors and print report at end
- Make variable `tests` an array, add safeguards
- Combine cases
- Make variables `dates`, `hours`, `minutes` an array, add `pad_with_zero` function
- Execute test with specific 'runtime', so it picks up fake time
  - Python scripts are then executed as `faketime <date> python3 <test>`
  - Shell scripts as `faketime <date> bash <test>`
  - Everything else as `faketime <date> <test>`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 21:59:07 +01:00
Thomas Lauf
269d1dff7b Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-09 14:39:50 +01:00
Lim Ding Wen
03443d259d TagColorDoc: Add tag color documentation to timew-chart.
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-07 15:53:06 +01:00
Lim Ding Wen
3ea6a5ccd4 TagColorDoc: Add line break for easier reading.
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-07 15:53:06 +01:00
Lim Ding Wen
c7781927ec TagColorDoc: Added man documentation for configuring tag colors.
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-07 15:53:06 +01:00
Thomas Lauf
e1b29b388e Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-07-14 21:05:20 +02:00
Shaun Ruffell
7ffb2421a2 AtomicFile: Minor cleanups
1) Remove AtomicFile::impl::find and use std::find_if directly.

2) Remove static functions that take a string for path. Allow the compiler to
construct the Path object as necessary.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-07-13 20:31:55 +02:00
Shaun Ruffell
12696bf40c AtomicFile: Make the forward impl declaration private
This is more consistent with the intent of the code.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-07-13 20:31:55 +02:00
Thomas Lauf
51d90114aa Deactivate macOS 11 test runner
Seems to be not yet available for everyone...

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-13 22:45:57 +02:00
Thomas Lauf
1a7003fa07 Add macOS 11 test runner
Use official system name `macOS`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-13 22:30:40 +02:00
Thomas Lauf
00dc654813 Reactivate ArchLinux test image
- Switch to Docker Official Image (https://hub.docker.com/_/archlinux)
- Closes #412

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-13 22:30:40 +02:00
Tomas Babej
972051fe11 CONTRIBUTING: Explain how to sign off commits
Signed-off-by: Tomas Babej <tomas@tbabej.com>
2021-06-13 14:55:57 +02:00
Tomas Babej
47c17b6833 README: Add image header and basic badges
Signed-off-by: Tomas Babej <tomas@tbabej.com>
2021-06-13 14:55:57 +02:00
Thomas Lauf
5ecac5b407 Fix CMake installation on CentOS 8 test image
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-11 21:31:38 +02:00
Thomas Lauf
14050d84f3 Update documentation
- Add documentation of `:all` hint
- Add `timew-hints` as `SEE ALSO` to `timew-ranges`

Related to #408

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-11 15:05:40 +02:00
Thomas Lauf
35dc22c8ef Enter commit hash for release 1.4.3
Set current version to `1.4.3-dev`
Fix test `version.t` to correctly verify version string

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 14:29:25 +02:00
Thomas Lauf
fc618636aa Prepare for release 1.4.3
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 13:04:33 +02:00
Thomas Lauf
3441b2ed93 Update example en-US holiday file
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 12:24:35 +02:00
Thomas Lauf
7dc8c910d5 Add Asciidoctor to build requirements in INSTALL
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 11:46:30 +02:00
Thomas Lauf
67ced9da56 Fix versions for C++14 support
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 23:08:17 +02:00
Thomas Lauf
2372770f6a Increase minimum requirement to C++14
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 22:50:52 +02:00
Thomas Lauf
0b74e850fb Fix pyenv setup
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 22:02:02 +02:00
Thomas Lauf
75d3e879d6 Fix always true comparison
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:32 +02:00
Thomas Lauf
29d3043f29 Update copyright ranges
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:32 +02:00
Thomas Lauf
379959e017 Optimize imports
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:31 +02:00
Shaun Ruffell
e170e344af test/modify: Remove a few unused variables
I left some unused varaibles in a new test functions after copy-paste.

This addresses @laufts comments on #423.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-19 12:22:22 +02:00
Shaun Ruffell
3ea086dcff Allow getTracked to match intervals that intersect with filter
It is not sufficient to stop looking for matching intervals if the
interval start time is before the filter. We really want to make sure
that we pick up any intervals that intersect with the filter.

Fixes bug introduced in (a98bd14 "Simplify getIntervalsById and
getTracked") as part of #423.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-19 12:22:22 +02:00
Thomas Lauf
d133d88247 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 22:18:42 +02:00
Thomas Lauf
0edef6eda4 Use more efficient overload with character
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
f185589f47 Remove note about tests in tarballs
- As mentioned in #380, tarballs will also contain tests so package maintainers can run them

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
63cd94b5c1 Add Asciidoctor to build requirements
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
44a386ef9a Increase minimum requirement to C++14
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Shaun Ruffell
a98bd14d66 Simplify getIntervalsById and getTracked
The intent here is to make similar the implementations of
getIntervalsById and getTracked, since they are both gathering a
collection of intervals from the database, but they are just using a
different criteria for which ones to pull.

This also eliminates the use of std::deque.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
92697cc1ad test:opensuse1500: Update asciidoctor to 2.0.15
This also installs asciidoctor 2.0.15 explicitly so that if the latest
is changed upstream the update-alternatives line will not break.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
73970b3755 Do not delete and then re-add the latest interval when flattening Database
Eliminates extra noise in the debug output. I.e. from #422 the original
report contained:

  >> 2021-05.data: Deleted inc 20210511T161243Z # "TRACKER-6145"
  >> 2021-05.data: Added inc 20210511T161243Z # "TRACKER-6145"

Which isn't doing anything.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
bba56cc633 getIntervalsById: Only add truly synthetic intervals to synthetic vector
This fixes an error where the latest interval, a non-synthetic interval,
is added to the synthetic array (and marked synthetic) if flatten() is
otherwise not able to convert it to a group of synthetic intervals.

When modify was attempting to edit this interval, it would fail since
synthetic intervals should not be written to the database unless the
database is being flattened and timewarrior believed the interval to be
modified was synthetic.

Closes #422

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
3e5aa0d7ec Trivial: Fix indentation in getIntervalsById
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
939491d060 Dump intervals in serialization check
The Interval::dump() method will show if intervals are synthetic or not,
which can be useful when trying to determine why a comparison is
failing.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Thomas Lauf
4c8ccd99c3 Add Fedora 33 test image
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-04-10 23:15:30 +02:00
Thomas Lauf
29e213eefc Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-04-10 23:04:34 +02:00
Thomas Lauf
a2507be7ea Add assertion for interval count
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-04-10 23:04:20 +02:00
Shaun Ruffell
0460656afe Allow tags to be enclosed in double quotes
Closes #159

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Shaun Ruffell
fd6d57dbc2 Use json::{encode|decode} for reading / writing JSON.
The JSON library in libshared has functions to esacpe JSON's special
characters, but they are not used by default.

Closes #416
Related to #261

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Shaun Ruffell
2897379b14 test:summary.t: Single digit week test should use logical or
The bitwise or, `|` had higher precendence than the `>` test. Fixes the
following error:

  not ok 4 - summary.t: Summary should work with :all hint
  # FAIL: AssertionError on file test/summary.t line 213 in test_with_all_hint: 'self.assertIn("""':
  #       '
  # Wk Date       Day ID Tags    Start      End    Time   Total
  # -- ---------- --- -- ---- -------- -------- ------- -------
  # W13 2021-04-04 Sun @3 FOO  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-05 Mon @2 BAR  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-06 Tue @1 BAZ  10:00:00 11:00:00 1:00:00 1:00:00
  #
  #                                                     3:00:00
  # ' not found in '
  # Wk  Date       Day ID Tags    Start      End    Time   Total
  # --- ---------- --- -- ---- -------- -------- ------- -------
  # W13 2021-04-04 Sun @3 FOO  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-05 Mon @2 BAR  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-06 Tue @1 BAZ  10:00:00 11:00:00 1:00:00 1:00:00
  #
  #                                                      3:00:00
  #
  # '

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Shaun Ruffell
d92ce2110f test: The tests depend on the documentation.
The help.t test wants to verify that some of the man pages exist.
Therefore we need to make sure the documentation is built, otherwise:

  $ git clean -ffdx .
  $ cmake -DCMAKE_BUILD_TYPE=Debug .
  $ make test

Will fail some of the help.t tests.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Thomas Lauf
c83d45bc0d Replace Travis CI badge with Github Actions badge
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-28 21:13:53 +01:00
Thomas Lauf
b189ccb020 Replace roff man pages with asciidoctor
This replaces the generation of man pages on project setup
by a on-demand generation via asciidoctor.
An exception are the man pages for the commands `day`, `month`, and `week`
which are simply redirects to the man page `timew-chart.1`. Those are now
static files in the Timewarrior repository.

A CMake find module to detect asciidoctor was added.
If asciidoctor is found, the targets `doc`, `man1`, and `man7` are created.
Those targets are also added to the default build target.

If asciidoctor is not available, the target `doc` is available, but it only
emits a message to install asciidoctor first.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-21 20:58:30 +01:00
Thomas Lauf
65ef38658b Increase minimal CMake version
Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
According to our test images all supported distributions have CMake > 3

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-12 10:50:39 +01:00
Thomas Lauf
b0e5ad6bc5 Replace Travis CI with Github Workflow
Closes #411

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-09 22:16:42 +01:00
Thomas Lauf
813754144c Remove Gentoo from test zoo
See #380. We will include the test suite in the release tarball so the Gentoo maintainers can run it and report back.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-07 17:16:26 +01:00
Thomas Lauf
0fb7a88159 Ensure Ubuntu 16.04 docker image compiles Timewarrior with gcc >6
- libshared now requires C++14

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-26 13:36:54 +01:00
Thomas Lauf
ab240419df Ensure CentOS 7 docker image compiles Timewarrior with gcc >6
- libshared now requires C++14

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-26 13:36:03 +01:00
Thomas Lauf
2cfeef1aa2 Update libshared to c1760be8686ce0b2f778832aaa1e2f98eed2ffc1
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-25 14:31:00 +01:00
Thomas Lauf
1a6c30b93a Fix test summary.t for single-digit weeks
If summary is called during a single digit week, the respective column is only 2 characters wide

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-25 13:49:56 +01:00
Thomas Lauf
b7882fd71f Move license URL up, so Github detects the license type correctly
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-22 17:53:03 +01:00
Tomas Babej
e5870380a4
doc: Update copyright to 2021 2021-01-02 02:52:39 -05:00
Tomas Babej
572c29e7dd
ChangeLog: Add entry about Unicode support 2020-12-20 15:34:28 -05:00
Tomas Babej
2babc52dc5
build: Update libshared to version supporting Unicode 11 2020-12-20 15:34:04 -05:00
Peter
c9b212ce15 Update dark_blue.theme
fixed the description
2020-11-23 12:46:39 +01:00
Shaun Ruffell
ce021a87e3 test: Thread.isAlive() -> Thread.is_alive()
Python added Thread.is_alive() in 2.6 and removed Thread.isAlive() in
3.9.

This change is needed to run the tests with Python 3.9.

https://bugs.python.org/issue37804
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-11-21 15:34:04 +01:00
Thomas Lauf
ace5cbe876 Update libshared to 9d4a44f877611484233bab42fd9e5af3ef47b26c
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-11-09 21:50:47 +01:00
Thomas Lauf
532d1b4e91 Add test for get dom.tracked.tags with a tag with quotes
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 09:20:22 +02:00
Thomas Lauf
dafca6662d Accommodate tests for missing space at end of line
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 09:07:32 +02:00
Thomas Lauf
a8b4055ad5 Quote tags if needed when outputting them on one line
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 08:36:46 +02:00
Thomas Lauf
5b1deaab59 Do not overwrite interval index when parsing DOM reference
- Closes #390

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 08:36:46 +02:00
Joerg Kastning
d90eab17a0 Fixed URL for tarball download 2020-09-15 14:17:57 +02:00
Thomas Lauf
985717e9c8 Deactivate Gentoo Docker image due to its high maintenance costs
- See issue #380 for details

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-09-04 10:43:13 +02:00
Thomas Lauf
2e4d3266cf Add space
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-09-03 23:34:29 +02:00
Thomas Lauf
78fe021e47 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-09-03 22:06:36 +02:00
Thomas Lauf
4487b9a617 Enter commit hash for release 1.4.2
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-09-03 22:06:36 +02:00
Shaun Ruffell
ae5e44c558 CmdSummary: Show recent intervals that start later in day than first interval with :all
It was possible for `summary` command, when used with the :all hint, to
skip over any intervals that start later than the first interval in the
database.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-09-03 21:56:22 +02:00
Thomas Lauf
4aa8489243 Prepare for release 1.4.2
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 20:30:33 +02:00
Thomas Lauf
04da28fadd Enter commit hash for release 1.4.1
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 20:27:29 +02:00
Thomas Lauf
8cca35dff2 Remove deleted file COPYING from CMakeLists.txt
-Closes #377

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 20:18:25 +02:00
Thomas Lauf
40617b094f Update project version
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 20:16:42 +02:00
Thomas Lauf
6747beb296 Prepare for release 1.4.1
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 19:30:56 +02:00
Thomas Lauf
86024b1a41 Set upper limit for summary table to now if both filter and latest interval are open
- Closes #378

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 19:26:30 +02:00
Thomas Lauf
b9d3b284fa Enter commit hash for release 1.4.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 19:26:30 +02:00
Thomas Lauf
2447c38172 Prepare for release 1.4.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 13:22:39 +02:00
Thomas Lauf
4e8cb8b90e Drop NEWS, COPYING
- Content of `NEWS` is either already in README.md or file just echoes Timewarriors release notes on github
- `COPYING` is identical to `LICENSE`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>

fixup! Drop 'NEWS'

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 11:27:50 +02:00
Thomas Lauf
87c91b1f79 Update copyright
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 11:27:50 +02:00
Thomas Lauf
63b5770a74 Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-29 11:00:07 +02:00
Thomas Lauf
1308a124bb Replace Fedora 28 and Fedora 29 by Fedora 31 and Fedora 32
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-23 12:54:22 +02:00
Thomas Lauf
60c138b959 Adding ubuntu20.04 to the test zoo
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-23 12:27:16 +02:00
Thomas Lauf
bc7c62ecf4 Fix indentation
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-23 12:24:40 +02:00
Thomas Lauf
ac9998f01c Add docker test images for CentOS 7 and 8
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-22 12:52:40 +02:00
Thomas Lauf
ffe329cd30 Adding centos8 to the test zoo
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-22 11:39:32 +02:00
Thomas Lauf
e451a135e2 Add test for command track with future time
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-21 23:04:03 +02:00
Thomas Lauf
1ba3ee8a32 Block future times for command continue
- This is meant as a temporary fix until Timewarrior can handle intervals regardless of start time
- Closes #364

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-21 23:03:53 +02:00
Shaun Ruffell
45eec2f7a0 Add test for command continue with future time
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-21 23:03:53 +02:00
Thomas Lauf
8b9389b5ad Add hash for version 1.3.0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-21 21:41:20 +02:00
Shaun Ruffell
9d43727c09 Use only the current interval duration when summarizing
There are several instances where the "total" reported in the interval
summary is confusing because the summarize function would walk backward
and add all intervals with the same set of tags.

Closes #248 and #308

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-21 21:41:20 +02:00
Thomas Lauf
7405d2be96 Drop empty intervals during overlap resolution
- Closes #372

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-21 18:08:13 +02:00
Thomas Lauf
8daf11328d Add starting times to start command
- It seems that recent changes made the `stop` command faster such that these tests aborted with "The end of a date range must be after the start."

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 15:41:52 +02:00
Thomas Lauf
55ea1aafce Fix typo
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 15:41:52 +02:00
Thomas Lauf
abf4784aba Command start now hints for command continue if called with ids
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 15:41:52 +02:00
Thomas Lauf
e69bd4b03b Coding style: Add spaces
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 15:41:52 +02:00
Thomas Lauf
3feba61459 Rework stop command
- Compute the set difference between the latest interval's tag set and the given tag set
- If no tags given, the difference is set to `{}`
- In case of an empty difference, close the current open interval, apply exclusions and update the database
- In case of a non-empty difference, just add a new open interval and let the overlap resolution do the job...

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 15:41:52 +02:00
Thomas Lauf
96aaa71eb4 Move validation for tag set up
- The given set of tags must be a subset of the latest interval's tag set (this includes the empty case)
- If not a subset, throw an error and show the first non-matching tag
- This also prevents the stop command from doing any work on the database
- Closes #280

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 15:41:52 +02:00
Thomas Lauf
5b1c77b8aa Move validation of filter range up
- Use default range starting at `now`
- Add check for no datetime given (rare case of e.g. `timew stop :all`)

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 15:41:52 +02:00
Thomas Lauf
990e0772d0 Add tests for stop command
- Stop with no datetime (rare case of e.g. `timew stop :all`)
    - `stop` with tag after `start` without tags
2020-08-19 15:41:34 +02:00
Thomas Lauf
7858bf4be8 Inline cli.getIds ()
- It is only used to hint for the modify command if any ids are given

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-19 14:10:57 +02:00
Thomas Lauf
11877d3fff Restrict application of exclusions to range before now for open intervals
- Closes #370

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-18 18:58:05 +02:00
Shaun Ruffell
26fdebf754 CmdReport: Throw error if report fails to produce output
Ideally this would be fixed in libshared.

See GothenburgBitFactory/libshared#27

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-17 13:05:33 +02:00
Shaun Ruffell
670fc289e9 CmdDiagnostics: Show per-file error messages.
I had a broken symbolic link in my extensions directory. When I ran
`timew diag` it would simply print on the screen:

```
stat error 2: No such file or directory
```

After this change, there is more context information about the source of
the error:

```
  timew 1.3.0
         Platform: Linux

  Compiler:
          Version: 7.5.0
             Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
       Compliance: C++11

  Build Features
            Built: Aug 14 2020 05:57:06
           Commit: 6fe15d26
            CMake: 3.10.2
       Build type: Debug

  Configuration
    TIMEWARRIORDB: -
              Cfg: /home/sruffell/.timewarrior/timewarrior.cfg (-rw- 0 bytes)
         Database: /home/sruffell/.timewarrior (drwx 4096 bytes)
          $EDITOR: vim
      Color theme: Built-in default
                   00 01 02 03 04 05 06 07 08 09 10 11 12

  Extensions
         Location: /home/sruffell/.timewarrior/extensions (drwx 4096 bytes)
                   /home/sruffell/.timewarrior/extensions/tsheet (stat error 2: No such file or directory)
```

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-17 13:05:33 +02:00
Thomas Lauf
0137703512 Update libshared
- Version containing #26 which fixes a compilation error on FreeBSD
- Related to #258

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-16 16:04:49 +02:00
Thomas Lauf
02491f8153 Restore behaviour for adding a new interval with same tag set
- Closes #351

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-14 22:33:16 +02:00
Thomas Lauf
ea33b29986 Coding style: add spaces
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-13 10:12:16 +02:00
Thomas Lauf
e57fadc7a7 Fix comments
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-13 10:12:16 +02:00
Thomas Lauf
0db5598aa6 Add brackets to if-/for-statement
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-13 10:12:16 +02:00
Thomas Lauf
f00c4b9464 Use Range::is_started ()/Range::is_ended () instead of accessing range.start/range.end
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-13 10:12:16 +02:00
Thomas Lauf
bffce7ef28 Use empty() instead of size () == 0
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-13 10:12:16 +02:00
Thomas Lauf
a4a16ec2c5 Use const bool uniformly for variable 'verbose'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-13 10:12:16 +02:00
Thomas Lauf
6fe15d2643 Enter new URL for distribution package list
- Changed from `/docs/download.html` to `/docs/install.html`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-13 10:12:16 +02:00
Shaun Ruffell
e99eee55d8 CmdHelp: Include wait.h for exit() support.
Fixes the following errors when compiling on FreeBSD 12.1:

  [ 75%] Building CXX object src/commands/CMakeFiles/commands.dir/CmdHelp.cpp.o
  /home/user/timew-1.3.0/src/commands/CmdHelp.cpp:123:13: error: use of undeclared identifier 'WIFEXITED'
  return (WIFEXITED (ret)) ? WEXITSTATUS (ret) : -1;
  ^
  /home/user/timew-1.3.0/src/commands/CmdHelp.cpp:123:32: error: use of undeclared identifier 'WEXITSTATUS'
  return (WIFEXITED (ret)) ? WEXITSTATUS (ret) : -1;
  ^
  2 errors generated.
  *** Error code 1

Thanks @kbcb
Related to issue #258

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-13 09:51:31 +02:00
Thomas Lauf
566d14bc08 Use latest release version in README.md
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-08-12 16:43:25 +02:00
Shaun Ruffell
22dc0efa70 test: Add test to ensure Datafile throws when deleteInterval fails
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-11 10:39:34 +02:00
Shaun Ruffell
7481dab8d0 Datafile: Throw exception if Datafile::deleteInterval fails
This is particularly bad when called from the Database::modifyInterval
call, since the delete may fail, but then the addInterval will proceed.

Closes #319

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-11 10:39:34 +02:00
Shaun Ruffell
48baa27057 test: Move TempDir to standalone file
I would like to use TempDir for the Datafile test in order to cleanup
any datafiles created as part of the test.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-11 10:39:34 +02:00
Shaun Ruffell
eae8746df2 test: Add the timew binary as dependency of test target
If the timew binary changes, we should rebuild it before running
through the python tests.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-11 10:39:34 +02:00
Shaun Ruffell
c75d9fefad test: Remove unused variables from DatetimeParser.t
Quiets the following warnings when building the test:

  test/DatetimeParser.t.cpp: In function ‘int main(int, char**)’:
  test/DatetimeParser.t.cpp:163:7: warning: unused variable ‘hm’ [-Wunused-variable]
     int hm  = (12 * 3600) + (34 * 60);      // The time 12:34:00 in seconds.
         ^~
  test/DatetimeParser.t.cpp:164:7: warning: unused variable ‘z’ [-Wunused-variable]
     int z   = 3600;                         // TZ offset.
         ^
  test/DatetimeParser.t.cpp:317:7: warning: unused variable ‘t8a’ [-Wunused-variable]
     int t8a   = (8 * 3600);
         ^~~
  test/DatetimeParser.t.cpp:318:7: warning: unused variable ‘t830a’ [-Wunused-variable]
     int t830a = (8 * 3600) + (30 * 60);
         ^~~~~
  test/DatetimeParser.t.cpp:319:7: warning: unused variable ‘t8p’ [-Wunused-variable]
     int t8p   = (20 * 3600);
         ^~~
  test/DatetimeParser.t.cpp:320:7: warning: unused variable ‘t830p’ [-Wunused-variable]
     int t830p = (20 * 3600) + (30 * 60);
         ^~~~~
  test/DatetimeParser.t.cpp:321:7: warning: unused variable ‘t12p’ [-Wunused-variable]
     int t12p  = (12 * 3600);
         ^~~~
  test/DatetimeParser.t.cpp:322:7: warning: unused variable ‘t1p’ [-Wunused-variable]
     int t1p   = (13 * 3600);
         ^~~
  test/DatetimeParser.t.cpp:325:7: warning: variable ‘adjust’ set but not used [-Wunused-but-set-variable]
     int adjust = (time_now.hour () > 10 || (time_now.hour () == 10 && time_now.minute () > 30)) ? 86400 : 0;
         ^~~~~~

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-11 10:39:34 +02:00
Shaun Ruffell
a87117db09 Remove undo file if empty
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-10 22:24:52 +02:00
Shaun Ruffell
b0efdbc9ee Datafile: Remove empty files
If calling undo on an operation the removes many entries from the
datafiles, there would be many 0 length size files remaining in the data
directory. Now they will be removed if they are empty so they will not
longer need to be checked when parsing the database.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-10 22:24:52 +02:00
Shaun Ruffell
b2a8fe6f55 test: Add tests for -1, 0, 1, and 2 'journal.size' settings
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-10 22:24:52 +02:00
Shaun Ruffell
a1e2def1a8 Introduce 'journal.size' config setting.
Allows the user to specify a maximum number of entries to store in the
undo file. By default the behavior is unchanged, and the file will grow
unbounded without user intervention.

journal.size = 0 will disable storing any entries, journal.size < 0
indicates that the size of the journal should be unlimited (the
default), otherwise it indicates the number of entries to store.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-10 22:24:52 +02:00
Shaun Ruffell
0a4644bfc7 AtomicFile: Add size() and remove() methods
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-10 22:24:52 +02:00
Shaun Ruffell
cea2e5d13f Only show tag in chart if utf8 character width is within the width
- Closes #309

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-17 21:44:22 +02:00
Thomas Lauf
06a4235b10 Move start of transaction down to actual database methods
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-17 17:53:59 +02:00
Thomas Lauf
b5aec4db8b Remove flattening of database in CmdContinue
- Should now be done during overlap resolution in `validate.cpp`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-17 17:53:04 +02:00
Thomas Lauf
6bf708dbeb Use dynamic test data for interval enclosing a month border in delete.t
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-17 13:59:05 +02:00
Thomas Lauf
90b5b1085e Adapt delete.t and move.t as today is now interpreted as a range
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-15 17:22:32 +02:00
Thomas Lauf
c35a08719f Move handling of starting a interval with identical tag set as the current tracking to standard overlap resolution
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-14 13:58:54 +02:00
Thomas Lauf
6618231002 CmdStart shall not accept ranges as input
- This also handles the case when it is called with the `:all` hint
- When called with a range, the `track` command is recommended
- There is no forwarding to `track`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-14 13:57:15 +02:00
Thomas Lauf
91c246c42f CmdStart should not redirect to CmdTrack but issue an error message when called with range
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-13 16:40:37 +02:00
Shaun Ruffell
cc82f468e1 CmdStart: Honor the :adjust flag when overwriting a currently open interval
Move the adjustment of a new open interval that is enclosed by the
current open interval into the validation processing, where the other
overlap resolution takes place.

This will allow the start command to honor the :adjust flag when
starting a new interval that predates the current open interval.

Closes #326

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-12 12:27:31 +02:00
Thomas Lauf
1c1066ae6c Adapt standard overlap resolution
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-12 12:18:54 +02:00
Shaun Ruffell
4aacba47df CmdStart: Do not assume :all hint means now
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-07-08 21:28:41 +02:00
Shaun Ruffell
6a52a412ba CmdStart: Do not silently fail if tags match
It was possible previously to start an interval with a filter earlier
than the current filter, and if the tags matched, the command would
report success without actually moving the start time.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-07-08 21:28:41 +02:00
Shaun Ruffell
356f20c9de Remove getOverlaps function
Since the Intervals are all in order, we can use getTracked directly to
get overlapping intervals without the need to copy the Intervals into
another vector.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-07-08 21:28:41 +02:00
Thomas Lauf
7bc511bc73 Update tests for TagInfoDatabase
- Add tests for JSON output
- Separate different test scenarios
- Optimize JSON output in `TagInfoDatabase::toJson ()`

- Closes #325

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-02 22:42:45 +02:00
Quazgar
ca10d52927 ENH: tags.data writes one entry per line.
This makes it easier to compare and merge the tags file from different machines.

Signed-off-by: Quazgar <quazgar@posteo.de>
2020-07-02 22:38:51 +02:00
Thomas Lauf
13a116a301 Update documentation of 'timew-continue'
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-02 19:59:47 +02:00
Thomas Lauf
d99872eb90 Finish implementation of 'continue by tag'
- This adds the last bits to the PR started by Christian Roesch:
- Some code formatting
- Specifying both id(s) and tag(s) is an error
- Clear range for tag filter: The range is meant to set the new interval's range, not the filter's
- Added tests
- Overhauled test using relative times and testing exported intervals instead of command line output
- Closes #241

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-02 19:59:47 +02:00
Christian Rösch
3def4b10c4 Refactor code as suggested and add tests. 2020-07-01 16:16:58 +02:00
Christian Rösch
f3280966e0 Allow continue by tag. 2020-07-01 16:16:58 +02:00
Thomas Lauf
6db29f1df5 Move overlap resolution from CmdContinue to function autoAdjust
- Only an open interval can truncate another open interval.
  Otherwise the `:adjust` hint has to be applied

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-07-01 08:12:04 +02:00
Thomas Lauf
c6598b9ac8 Convert to early return
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-30 21:17:51 +02:00
Thomas Lauf
07a6dfe313 Use functions is_started() and is_ended() instead of querying start/end directly
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-29 22:09:00 +02:00
Thomas Lauf
4637cd3d4e Do not manipulate filter in getTracked
- Filter shall be taken as is, not changed
- If there is a problem, the functions consuming the filter have to be adapted, not the filter

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-29 22:07:35 +02:00
Thomas Lauf
63f230013a Detect whether a date is meant as range
- Add DatetimeParser::parse_range: If a date contains no time, it is assumed to be a fixed range, else an open range starting at given datetime
- Add tests for summary with named dates 'yesterday' and 'today'
- Remove closing of filter in CmdSummary.cpp
- Closes #333

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-28 20:52:43 +02:00
Thomas Lauf
2906f36830 Add test for command summary with :all hint
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-22 22:21:27 +02:00
George Buckingham
90081afb97 Update docs links from taskwarrior.org to timewarrior.net
Signed-off-by: George Buckingham <george.buckingham@gmail.com>
2020-06-14 15:12:57 +02:00
Shaun Ruffell
59d0f1263f Mask signals while updating database
In order to keep the database consistent, we really want all the
AtomicFiles to be finalized as a group. This will prevent an inopportune
signal from interrupting this process.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-06-03 21:31:01 +02:00
Thomas Lauf
83ec55cdc6 Remove unused filter
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-03 18:44:36 +02:00
Thomas Lauf
c9eec956e4 Add hint :all
- Closes #206

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-03 18:44:36 +02:00
Thomas Lauf
6117ce1a84 Introduce default range parameter when requesting filter from CLI
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-06-03 17:47:14 +02:00
Thomas Lauf
7e11fde992 Remove template.t from test folder
- This file was development only, now any other test file can serve as template for new tests
- Closes #303

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-22 09:16:08 +02:00
Thomas Lauf
c71eeb6dfd Add DOM-query for ids
- Closes #126

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Thomas Lauf
2169e8e928 Add/update descriptive comments
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Thomas Lauf
a508dd21ea Get and use filter from CLI when processing DOM references
- Closes #188

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Thomas Lauf
13f1de2c49 Identify DOM references by their prefix ('dom.<...>') and mark them as such when analyzing the command line
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Thomas Lauf
9ae3ace109 Make getFilter(cli) a method of CLI 2020-05-10 21:44:30 +02:00
Thomas Lauf
547bda5ef8 Extract filter so it can be injected
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Thomas Lauf
6e5236d472 Add DOM query dom.tracked.tags
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Thomas Lauf
5c234c95f9 Move test setup to the test methods
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Thomas Lauf
422e49bacb Extract function getDomReferences and move it to CLI
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-05-10 21:44:30 +02:00
Shaun Ruffell
29cc9e8a0a Fix another place where json::parse() result was leaked
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-05-10 21:33:31 +02:00
Shaun Ruffell
42ede4104c Remove naked pointer in initializeTagDatabase
The json::object pointer was allocated in the parse function but never
freed.

The way timwarrior is used currently, this leak does not cause any
problems, but...

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-05-10 21:33:31 +02:00
Shaun Ruffell
85d991704b Speed up deserialization of Intervals
When the Lexer breaks a line into tokens, it also wants to return the
type of the token. This information isn't used by the IntervalFactory
and it slows down the operation since dates end up being parsed at least
twice, once by the Lexer to determine that the string is a date, then
again in the IntervalFactory to actually construct the Date.

Before are the before and after results when exporting a database with
100 lines. The number of instructions executed went from roughly 31,552,467 to
12,952,372 on debug builds. Release builds saw a change from around 14K
to 7K instructions.

Before:

  $ rm -fr ~/.timewarrior; src/timew :yes >/dev/null; for x in {100..1}; do src/timew start ${x}sec ago proj_${x} >/dev/null; done;
  $ sudo chrt -f 99 valgrind --tool=callgrind --callgrind-out-file=callgrind.out src/timew export >/dev/null
  ==20888== Callgrind, a call-graph generating cache profiler
  ==20888== Copyright (C) 2002-2017, and GNU GPL'd, by Josef Weidendorfer et al.
  ==20888== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
  ==20888== Command: src/timew export
  ==20888==
  ==20888== For interactive control, run 'callgrind_control -h'.
  ==20888==
  ==20888== Events    : Ir
  ==20888== Collected : 31552467
  ==20888==
  ==20888== I   refs:      31,552,467

After:

  $ sudo chrt -f 99 valgrind --tool=callgrind --callgrind-out-file=callgrind.out src/timew export >/dev/null
  ==24088== Callgrind, a call-graph generating cache profiler
  ==24088== Copyright (C) 2002-2017, and GNU GPL'd, by Josef Weidendorfer et al.
  ==24088== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
  ==24088== Command: src/timew export
  ==24088==
  ==24088== For interactive control, run 'callgrind_control -h'.
  ==24088==
  ==24088== Events    : Ir
  ==24088== Collected : 12952372
  ==24088==
  ==24088== I   refs:      12,952,372

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-05-10 21:16:08 +02:00
293 changed files with 14000 additions and 5356 deletions

7
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,7 @@
version: 2
updates:
# Enable version updates for GitHub actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

57
.github/workflows/docker-image.yaml vendored Normal file
View file

@ -0,0 +1,57 @@
name: Timewarrior Docker image
on:
workflow_dispatch:
workflow_run:
workflows: [tests]
branches:
- develop
- stable
types:
- completed
env:
REGISTRY: "ghcr.io"
jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Create lowercase repository name
run: |
GHCR_REPOSITORY="${{ github.repository_owner }}"
echo "REPOSITORY=${GHCR_REPOSITORY,,}" >> ${GITHUB_ENV}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install cosign
uses: sigstore/cosign-installer@v3.9.1
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3.4.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Timewarrior Docker image
id: build-and-push
uses: docker/build-push-action@v6.18.0
with:
context: .
file: "./docker/timew.dockerfile"
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/timew:${{ github.ref_name }}
- name: Sign the published Docker image
env:
COSIGN_EXPERIMENTAL: "true"
run: cosign sign ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/timew@${{ steps.build-and-push.outputs.digest }}

70
.github/workflows/tests.yaml vendored Normal file
View file

@ -0,0 +1,70 @@
name: tests
on: [push, pull_request, workflow_dispatch]
jobs:
tests:
strategy:
fail-fast: false
matrix:
include:
- name: "Alpine Edge"
runner: ubuntu-latest
container: alpine-edge
- name: "Alpine Latest"
runner: ubuntu-latest
container: alpine-latest
- name: "Archlinux Base"
runner: ubuntu-latest
container: archlinux
- name: "Centos Stream9"
runner: ubuntu-latest
container: centos-stream9
- name: "Debian Stable"
runner: ubuntu-latest
container: debianstable
- name: "Debian Testing"
runner: ubuntu-latest
container: debiantesting
- name: "Fedora 41"
runner: ubuntu-latest
container: fedora41
- name: "Fedora 42"
runner: ubuntu-latest
container: fedora42
- name: "OpenSUSE Leap"
runner: ubuntu-latest
container: opensuseleap
- name: "OpenSUSE Tumbleweed"
runner: ubuntu-latest
container: opensusetumbleweed
- name: "Ubuntu 22.04"
runner: ubuntu-latest
container: ubuntu2204
- name: "Ubuntu 24.04"
runner: ubuntu-latest
container: ubuntu2204
- name: "macOS 13"
runner: macos-13
container: osx-13
- name: "macOS 14"
runner: macos-14
container: osx-14
- name: "macOS 15"
runner: macos-15
container: osx-15
runs-on: ${{ matrix.runner }}
continue-on-error: ${{ matrix.continue-on-error == true }}
steps:
- uses: actions/checkout@v4
- name: Build ${{ matrix.name }}
env:
DOCKER_REGISTRY: docker.pkg.github.com
DOCKER_CACHE_IMAGE: docker.pkg.github.com/${{ github.repository }}/timewarrior_cache
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER: ${{ matrix.container }}
run: if [[ !( "${CONTAINER}" =~ osx-* ) ]] ; then docker compose build "test-${CONTAINER}" ; fi
- name: Test ${{ matrix.name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER: ${{ matrix.container }}
run: if [[ !( "${CONTAINER}" =~ osx-* ) ]]; then docker compose run "test-${CONTAINER}" ; else bash test/scripts/test_osx.sh ; fi

41
.github/workflows/update-docs.yml vendored Normal file
View file

@ -0,0 +1,41 @@
name: Update docs on ti.net
on:
workflow_dispatch:
release:
types:
- published
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Trigger remote workflow to update docs
run: |
repo_owner="GothenburgBitFactory"
repo_name="ti.net"
event_type="update-docs"
version="${{ github.event.release.tag_name }}"
# Collect .adoc documentation files
doc_filenames=$(find doc/man1 -name '*.adoc' -type f; find doc/man7 -name '*.adoc' -type f)
# Format doc_filenames with double quotes and commas
formatted_doc_filenames="[ $(echo ${doc_filenames} | sed 's/\S\+/\"&\",/g; s/,$//') ]"
base64_encoded_files=()
while IFS= read -r filename; do
base64_encoded_file=$(base64 "${filename}" | tr -d '\n')
base64_encoded_files+=("\"${base64_encoded_file}\"")
done <<< "${doc_filenames}"
# Format encoded_file_contents with quotes and commas
formatted_encoded_file_contents="[ $(IFS=,; echo "${base64_encoded_files[*]}") ]"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.UPDATE_DOCS }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${repo_owner}/${repo_name}/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"version\": \"${version}\", \"doc_filenames\": ${formatted_doc_filenames}, \"encoded_file_contents\": ${formatted_encoded_file_contents} }}"

1
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1 @@
repos: []

View file

@ -1,54 +0,0 @@
sudo: required
language: generic
matrix:
include:
- name: "Gentoo (latest)"
os: linux
env: CONTAINER=gentoo
services: docker
- name: "Fedora 28"
os: linux
env: CONTAINER=fedora28
services: docker
- name: "Fedora 29"
os: linux
env: CONTAINER=fedora29
services: docker
- name: "Debian Stable"
os: linux
env: CONTAINER=debianstable
services: docker
- name: "Debian Testing"
os: linux
env: CONTAINER=debiantesting
services: docker
- name: "Ubuntu 16.04"
os: linux
env: CONTAINER=ubuntu1604
services: docker
- name: "Ubuntu 18.04"
os: linux
env: CONTAINER=ubuntu1804
services: docker
- name: "OpenSUSE 15.0"
os: linux
env: CONTAINER=opensuse1500
services: docker
- name: "Archlinux"
os: linux
env: CONTAINER=archlinux
services: docker
- name: "macOS 10.13"
os: osx
osx_image: xcode9.4
env: CONTAINER=osx
- name: "macOS 10.14"
os: osx
osx_image: xcode10.3
env: CONTAINER=osx
install:
# Build the docker container
- pushd $TRAVIS_BUILD_DIR
- if [[ $CONTAINER != "osx" ]]; then docker-compose build test-$CONTAINER ; fi
script:
- if [[ $CONTAINER != "osx" ]]; then docker-compose run test-$CONTAINER; else bash test/scripts/test_osx.sh ; fi

44
AUTHORS
View file

@ -34,6 +34,19 @@ The following submitted code, packages or analysis, and deserve special thanks:
Dennis Schridde
quazgar
Johannes Hertenstein
Christian Rösch
silent-at-gh
Lim Ding Wen
Stanisław Wysocki
Scott Mcdermott
Daniel Hornung
Maxim Beder
Ankur Sinha
Povl Filip Sonne-Frederiksen
Benedikt Fein
Tadeas Uhlir
Iúri Archer
Ian Kenney
Thanks to the following, who submitted detailed bug reports and excellent suggestions:
@ -69,7 +82,6 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges
chronitis
rudis
bognolo
lumbric
Antanas B.
towo
sclo
@ -88,3 +100,33 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges
Saulius Krasuckas
Tom Dörr
Joerg Kastning
George Buckingham
Maximilian Merz
choppy812
kbcb
sclee15
varac
xeruf
Rafael Oliveira
agentcoffee
eq0cdk
squirrellyDave
Edd Salkield
Oivvio Polite
Davide Crucitti
Christian Kohlstedde
apkawel
Leon Grünewald
Ivo Forlin
aMOPel
Per Møldrup-Dalum
Beshoy Girgis
Sergey Zhuravlevich
catexis
Aniket Meshram
Joachim Meyer
arxel-sc
Eugene Morozov
Stefan Herold
Sebastian Carlos
ftambara

View file

@ -1,12 +1,13 @@
cmake_minimum_required (VERSION 2.8)
set (CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
cmake_minimum_required (VERSION 3.10)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
set (HAVE_CMAKE true)
project (timew)
include (CXXSniffer)
include (FindAsciidoctor)
set (PROJECT_VERSION "1.3.0")
set (PROJECT_VERSION "1.8.0-dev")
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
@ -16,7 +17,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
execute_process (COMMAND git log -1 --pretty=format:%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE COMMIT)
configure_file ( ${CMAKE_SOURCE_DIR}/commit.h.in
configure_file (${CMAKE_SOURCE_DIR}/commit.h.in
${CMAKE_SOURCE_DIR}/commit.h)
message ("-- Found SHA1 reference: ${COMMIT}")
endif (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
@ -31,19 +32,21 @@ set (PACKAGE_STRING "${PACKAGE} ${VERSION}")
string (TIMESTAMP PACKAGE_DATE "%Y-%m-%d")
if (FREEBSD OR DRAGONFLY)
SET (TIMEW_MAN1DIR man/man1 CACHE STRING "Installation directory for man pages, section 1")
SET (TIMEW_MAN5DIR man/man5 CACHE STRING "Installation directory for man pages, section 5")
SET (TIMEW_MAN7DIR man/man7 CACHE STRING "Installation directory for man pages, section 7")
set (TIMEW_MANDIR man CACHE STRING "Installation directory for man pages")
set (TIMEW_MAN1DIR ${TIMEW_MANDIR}/man1 CACHE STRING "Installation directory for man pages, section 1")
set (TIMEW_MAN5DIR ${TIMEW_MANDIR}/man5 CACHE STRING "Installation directory for man pages, section 5")
set (TIMEW_MAN7DIR ${TIMEW_MANDIR}/man7 CACHE STRING "Installation directory for man pages, section 7")
else (FREEBSD OR DRAGONFLY)
SET (TIMEW_MAN1DIR share/man/man1 CACHE STRING "Installation directory for man pages, section 1")
SET (TIMEW_MAN5DIR share/man/man5 CACHE STRING "Installation directory for man pages, section 5")
SET (TIMEW_MAN7DIR share/man/man7 CACHE STRING "Installation directory for man pages, section 7")
set (TIMEW_MANDIR share/man CACHE STRING "Installation directory for man pages")
set (TIMEW_MAN1DIR ${TIMEW_MANDIR}/man1 CACHE STRING "Installation directory for man pages, section 1")
set (TIMEW_MAN5DIR ${TIMEW_MANDIR}/man5 CACHE STRING "Installation directory for man pages, section 5")
set (TIMEW_MAN7DIR ${TIMEW_MANDIR}/man7 CACHE STRING "Installation directory for man pages, section 7")
endif (FREEBSD OR DRAGONFLY)
SET (TIMEW_DOCDIR share/doc/timew CACHE STRING "Installation directory for doc files")
set (TIMEW_DOCDIR share/doc/timew CACHE STRING "Installation directory for doc files")
set (TIMEW_BINDIR bin CACHE STRING "Installation directory for Timewarrior executable")
message ("-- Configuring cmake.h")
configure_file (
${CMAKE_SOURCE_DIR}/cmake.h.in
configure_file (${CMAKE_SOURCE_DIR}/cmake.h.in
${CMAKE_SOURCE_DIR}/cmake.h)
add_subdirectory (src)
@ -54,7 +57,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/test)
add_subdirectory (test EXCLUDE_FROM_ALL)
endif (EXISTS ${CMAKE_SOURCE_DIR}/test)
set (doc_FILES NEWS ChangeLog README.md INSTALL AUTHORS COPYING LICENSE)
set (doc_FILES ChangeLog README.md INSTALL AUTHORS LICENSE)
foreach (doc_FILE ${doc_FILES})
install (FILES ${doc_FILE} DESTINATION ${TIMEW_DOCDIR})
endforeach (doc_FILE)
@ -63,9 +66,22 @@ endforeach (doc_FILE)
set (CPACK_SOURCE_GENERATOR "TGZ")
set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSourceConfig"
"_CPack_Packages" "cmake_install" "install_manifest" "Makefile$"
"test" "package-config" "src/timew$" "src/libtimew.a"
"src/commands/libcommands.a" "src/lex$" "src/liblibshared.a"
"/\\\\.gitignore" "/\\\\.git/" "swp$")
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache"
"CMakeFiles"
"CPackConfig"
"CPackSourceConfig"
"_CPack_Packages"
"cmake_install"
"install_manifest"
"Makefile$"
"test"
"package-config"
"src/timew$"
"src/libtimew.a"
"src/commands/libcommands.a"
"src/lex$"
"src/liblibshared.a"
"/\\\\.gitignore"
"/\\\\.git/"
"swp$")
include (CPack)

View file

@ -8,13 +8,13 @@ Anyone can contribute, and everyone is encouraged to do so.
Here are the different ways you might conѕider contributing:
1. Reviews
1. Bug reports
1. Feature requests
1. Code contribution
2. Bug reports
3. Feature requests
4. Code contribution
Please read the respective section below about the details.
Otherwise you can spread the word and recommend Timewarrior to your friends and colleagues.
Otherwise, you can spread the word and recommend Timewarrior to your friends and colleagues.
## Reviews
@ -29,7 +29,7 @@ It is also the quickest way to get help, or confirm a bug.
Review documentation: there are man pages, online articles, tutorials and so on, and these may contain errors, or they may not convey ideas in the best way.
You can help improve it.
Documentation is a separate effort from the codebase, and includes all web sites, and all are available using git.
Documentation is a separate effort from the codebase, and includes all websites, and all are available using Git.
Take a look at the bug database, and help triage the bug list.
Bug triage is very useful and much needed.
@ -43,7 +43,7 @@ Review the source code, and point out inefficiencies, problems, unreadable funct
## Bug reports
Before you submit a bug report, make sure you are using the latest version of Timewarrior.
Also please take your time and scan the current bug tickets on our [Github issue tracker](https://github.com/GothenburgBitFactory/timewarrior/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Abug) whether your issue has already been reported.
Also, please take your time and scan the current bug tickets on our [GitHub issue tracker](https://github.com/GothenburgBitFactory/timewarrior/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Abug) whether your issue has already been reported.
When you submit a bug report, be precise and put as much information into your bug report as possible.
You should at least provide
@ -64,7 +64,7 @@ An example:
## Feature requests
As for bug reports, you should check our [Github issue tracker](https://github.com/GothenburgBitFactory/timewarrior/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aenhancement) whether your feature has already been requested.
As for bug reports, you should check our [GitHub issue tracker](https://github.com/GothenburgBitFactory/timewarrior/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aenhancement) whether your feature has already been requested.
When you submit a feature request, provide a use case which captures the overall intention of your feature, not the technical implementation.
@ -85,9 +85,9 @@ Plus, you might get your feature implemented.
There are different ways you can contribute code to the project:
1. Add extensions
1. Add tests
1. Fix bugs
1. Add features
2. Add tests
3. Fix bugs
4. Add features
### Extensions
@ -96,12 +96,12 @@ Extensions are standalone programs or scripts that consume Timewarrior data outp
Extensions are the easiest way to contribute as you only need to adhere to the extension API, but are otherwise free in your choice of programming language and style.
Consult the [documentation](https://taskwarrior.org/docs/timewarrior/api.html) on how you can use the extension API.
Consult the [documentation](https://timewarrior.net/docs/api.html) on how you can use the extension API.
### Tests, Bug-fixes and Features
In general your contributions have to be associated with an issue on our [Github issue tracker](https://github.com/GothenburgBitFactory/timewarrior/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen).
In general your contributions have to be associated with an issue on our [GitHub issue tracker](https://github.com/GothenburgBitFactory/timewarrior/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen).
See the sections above on how to submit bug reports and feature requests.
Code contributions are only accepted as pull-requests.
@ -123,32 +123,32 @@ By contributing, you are declaring that you have the right to submit the code un
## How to make a pull-request
The main branch for development is named `dev`.
The main branch for development is named `develop`.
This is the branch where your changes must go.
The `master` branch always points to the latest release.
The `stable` branch always points to the latest release.
No development takes place here.
To make a pull request you need to have a Github account.
To make a pull request you need to have a GitHub account.
1. Fork the [Timewarrior repository](https://github.com/GothenburgBitFactory/timewarrior) on Github.
1. Checkout the development branch.
1. Fork the [Timewarrior repository](https://github.com/GothenburgBitFactory/timewarrior) on GitHub.
2. Checkout the development branch.
$ git checkout dev
1. Create a feature branch.
3. Create a feature branch.
$ git checkout -b feature_branch
1. Commit your changes, and finally push to the remote repository.
4. Commit your changes, and finally push to the remote repository.
Use a commit message that matches the prevailing format. (See `git log` for examples.)
$ git commit -am '<issue>: <description>'
$ git commit --signoff -am '<issue>: <description>'
...
$ git push origin feature_branch
Furthermore, commits should be signed off according to the [DCO](DCO).
Furthermore, commits should be signed off according to the [DCO](DCO) (use `-s` / `--signoff` flag when committing).
1. Create the pull request on Github.
5. Create the pull request on GitHub.
## What happens next?
@ -206,5 +206,5 @@ To be a little more explicit, the common elements across the languages are:
We target Python 3 so that our test suite runs on the broadest set of platforms.
We can safely target C++11 because all the default compilers on our supported platforms are ready.
Feel free to use C++14 and C++17 provided that all build platforms support this.
We can safely target C++17 because all the default compilers on our supported platforms are ready.
Feel free to use C++20 provided that all build platforms support this.

23
COPYING
View file

@ -1,23 +0,0 @@
Timewarrior - a command line time tracker
Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
https://www.opensource.org/licenses/mit-license.php

201
ChangeLog
View file

@ -1,6 +1,199 @@
- #677 Extension names starting with 'timew' cause problems
(thanks to ftambara)
- #661 Make display of ids and annotations the default in summary report for new users
- #669 id filtering for charts and reports
- #660 Fix man page section numbers and reference formatting
------ current release ---------------------------
1.3.0 (2020-04-19) -
1.8.0 (2025-04-20) - 2257084710247189231118bc9257180a815ef21a
- #658 Add sub-command 'range' to command 'modify'
(thanks to Sebastian Carlos)
- #620 Fix installation of man pages from tarball
- #600 Add retag command to internal help
(thanks to Stefan Herold)
- #616 Add zsh completion
(thanks to Ian Kenney)
- #633 Make week number parsing ISO8601 compliant
(thanks to Scott Mcdermott)
- #632 Fix py3.12 warnings for datetime usage, non-raw regex strings
(thanks to Scott Mcdermott)
------ old releases ------------------------------
1.7.1 (2024-01-16) - 2514d506b5580154f1e00c0e72b17c8e9bc89cb7
- #580 internal parsing of tags starting with number broken
(thanks to arxel-sc)
- #582 Retrieval of intervals with tags containing hyphens is broken
(thanks to Eugene Morozov)
- #583 README - Update build instructions
(thanks to Joachim Meyer)
1.7.0 (2023-12-24) - 63f7fc95a0fa20dc768ae4e94b7f2d79c306f9dd
- #205 Wrap annotations in summary
(thanks to varac)
- #493 :lastweek doesn't count last Sunday
(thanks to Saulius Krasuckas, Per Møldrup-Dalum, Beshoy Girgis, Sergey Zhuravlevich)
- #494 Expand annotations in summary
(thanks to catexis)
- #566 Set table width dynamically to terminal width
- #573 Filter summary based on ids
(thanks to Aniket Meshram)
- #576 Fix quoting of tags in DOM output
- Add ':today' hint
- Refactor holidays/refresh script
- Update task-timewarrior-hook script to 87a3426d8153f92aaee2edf36b2de62e48c4de0e
1.6.0 (2023-09-18) - cd1aa610ed50558bb2cf141022fa7b41523091ac3ae5fbb9c2d459cfe1afc782
- #529 Fix summary truncating multibyte characters in long annotations
(thanks to Maxim Beder, Leon Grünewald)
- #531 Update CONTRIBUTING.md to use branch 'develop' instead of 'dev'
(thanks to Maxim Beder)
- #535 Adding completion for fish shell
(thanks to Povl Filip Sonne-Frederiksen)
- #538 Fix man page build for out-of-source builds
(thanks to Benedikt Fein)
- #540 reports should end at current time if a task is still running
(thanks to Ankur Sinha)
- #547 AtomicFile: Operate on the target of symlinks
(thanks to Shaun Ruffel, Ivo Forlin)
- #551 Add retag command
(thanks to Iúri Archer)
- #552 Extend XDG support to macOS
(thanks to Tadeas Uhlir)
- #553 Configurability of CMake install directories
(thanks to aMOPel)
- #554 Update documentation for command 'retag'
(thanks to quazgar)
- Use local man pages in tests
(thanks to Maxim Beder)
- Cleanup CMake files
- Update project to C++17
1.5.0 (2023-04-04) - 51e7c2c772837bbd6d56da8d16506c4b6de8644166e0b5234ad36ae6a70dd4f6
- #361 Improve documentation
(thanks to xeruf)
- #389 Extend summary configuration
(thanks to Davide Crucitti)
- #489 First execution creates database regardless of confirmation response
(thanks to Rafael Oliveira)
- #403 Remove incorrect output stating that an empty interval was recorded
(thanks to xeruf)
- #406 Clarify minimal value for 'epoch' as date value
(thanks to Daniel Hornung)
- #408 Update documentation of hint `:all`
(thanks to quazgar)
- #437 Minor AtomicFile cleanup
(thanks to Shaun Ruffel)
- #439 Show error message if command track is called with an id
- #441 Return report return code
(thanks to lospatchos)
- #444 Improve documentation on annotations
(thanks to apkawel, Shaun Ruffel)
- #450 Report 'totals.py' does not display data when no time range specified
(thanks to squirrellyDave)
- #458 Add man documentation for configuring tag colors.
(thanks to Lim Ding Wen)
- #463 Add colors to summary
(thanks to Lim Ding Wen)
- #466 Ignore empty exclusion ranges
- #468 Refactor interval filtering
- #469 Do not leak IntervalFilters in IntervalFilterAndGroup
(thanks to Shaun Ruffel)
- #470 Do not leak filter in IntervalFilterFirstOf
(thanks to Shaun Ruffel)
- #474 Make display of ids and annotations in summary report configurable
- #477 Add configurable default range for reports
(thanks to Oivvio Polite, Christian Kohlstedde)
- #478 Add support for XDG Base Directory specification on Unixes
(thanks to Stanisław Wysocki)
- #491 Tracking an interval in the future while actively tracking time results in a database inconsistency
(thanks to agentcoffee)
- #505 Report 'totals.py' does not truncate intervals to report range
(thanks to eq0cdk)
- #510 Export intervals by IDs
(thanks to Scott Mcdermott)
- #512 help.t fails on alpine with mandoc package
(thanks to Edd Salkield)
- Add option '--details' to 'test/problems' script
1.4.3 (2021-05-28) - fc618636aacba6e52d447b482aeef58b375dfc8c
- #159 Tags enclosed in escaped double-quotes are not handled correctly
(thanks to Shaun Ruffell)
- #379 CmdSummary: Fix calculation of display start in summary table
(thanks to Shaun Ruffell)
- #387 Fixed URL for tarball download
(thanks to Joerg Kastning)
- #390 dom.tracked.X.tag.Y always returns dom.tracked.1.tag.Y
(thanks to pweaver2019)
- #393 Update dark_blue.theme
(thanks to Peter Zuidema)
- #398 test: Thread.isAlive() -> Thread.is_alive()
(thanks to Shaun Ruffell)
- #410 Replace roff man pages with asciidoctor
- #411 Transfer platform testing from Travis CI to GitHub Actions
- #416 Internal error. Failed encode / decode check when doing undo
(thanks to narudarurarasya, Shaun Ruffel)
- #419 Links not preserved over linebreaks in man page
(thanks to draupadi77)
- #422 Internal error. Failed encode / decode check.
(thanks to Glen Solsberry, Shaun Ruffell)
- Width determination of Unicode characters now works for up to
Unicode 11 (from Unicode 5). Emojis are correctly displayed.
- Fix test `summary.t` for single-digit weeks
1.4.2 (2020-08-29) - 4aa8489243adb69958d7717fb2f010c72fd4505a
- #377 make install with error due to missing file `COPYING`
(thanks to Dirk Deimeke)
1.4.1 (2020-08-29) - 6747beb2963475f50d2d58b1da5465247eb9e28e
- #378 Summary with `:all` hint is empty for open interval
1.4.0 (2020-08-29) - 2447c3817212d0fd987a8fe749d181ba7073a978
- #126 DOM-Query for ids
- #188 DOM-Query for tags
- #206 Add :all hint
(thanks to varac, Shaun Ruffell)
- #241 Allow continue by tag.
(thanks to Christian Rösch)
- #258 make error FS.cpp on freebsd 12.1
(thanks to choppy812, silent-at-gh, kbcb, Shaun Ruffell)
- #307 Introduce 'journal.size' configuration item
(thanks to Shaun Ruffell)
- #309 unicode input causes indefinite hang for commands like day or month
(thanks to sclee15, Shaun Ruffell)
- #317 Fix memory leak in JSON parsing
(thanks to Shaun Ruffell)
- #318 Speed up deserialization of Intervals
(thanks to Shaun Ruffell)
- #331 start command adjust
(thanks to Shaun Ruffell)
- #333 Summary command fails with `:all` hint
- #335 Update docs links from taskwarrior.org to timewarrior.net
(thanks to George Buckingham)
- #347 delete interval silently fails
(thanks to Shaun Ruffell)
- #351 Stop failed to close currently tracking interval
(thanks to Shaun Ruffell)
- #364 Entering an open interval with future date causes assertion error
(thanks to kbcb)
- #370 Core dump on `timew week` when open interval overlaps into exclusion
(thanks to Maximilian Merz)
- #367 CmdDiagnostics: Show per-file error messages.
(thanks to Shaun Ruffell)
- #372 Empty intervals are not deleted in `:adjust` overlap resolution
(thanks to xeruf)
1.3.0 (2020-04-19) - 3de53d7599d1e4364c8aaaeb3c3ef1fe89ee3380
- #155 Corrupts database when no disk space available
(thanks to Shaun Ruffell, Tom Dörr)
@ -20,9 +213,9 @@
- #278 New hint :fortnight added
(thanks to quazgar)
- #282 Database: Fix error when empty datafile is most recent / oldest
(Thanks to Shaun Ruffell)
(thanks to Shaun Ruffell)
- #283 Use AtomicFile to commit files as a group
(Thanks to Shaun Ruffell)
(thanks to Shaun Ruffell)
- #284 tags.data modification date updated when file is not modified
(thanks to Shaun Ruffell, Charlie Gorichanaz)
- #285 Pass record id to extensions
@ -33,8 +226,6 @@
(thanks to Shaun Ruffell, Saulius Krasuckas)
- #298 Add current version of bash-completion
------ old releases ------------------------------
1.2.0 (2019-11-22) 1d271508a27b9d8a5211ae5b01c7a0583ff690fd
- #2 Generate a warning when a new tag is used on the command line

2
DCO
View file

@ -38,7 +38,7 @@ using your real name (sorry, no pseudonyms or anonymous contributions.)
The DCO text can either be manually added to your commit body, or you can add either **-s** or **--signoff** to your usual git commit commands.
If you forget to add the sign-off you can also amend a previous commit with the sign-off by running **git commit --amend -s**.
If you've pushed your changes to Github already you'll need to force push your branch after this with **git push -f**.
If you've pushed your changes to GitHub already you'll need to force push your branch after this with **git push -f**.
#### Alternative Sign-Off Methods in rare cases

63
INSTALL
View file

@ -7,12 +7,13 @@ Please follow the instructions below to build and install Timewarrior from sourc
In order to build Timewarrior, you will need:
- cmake (See https://cmake.org)
- make
- CMake (See https://cmake.org)
- Make
- Asciidoctor (for building documentation)
You will need a C++ compiler that supports full C++11, which includes:
- gcc 4.8.1 (released 2013-03-31)
- clang 3.3 (released 2013-06-17)
You will need a C++ compiler that supports full C++17, which includes:
- GCC 8
- Clang 5
# Basic Installation
@ -46,49 +47,41 @@ These commands are explained below:
# Build and configurations options
You can customize the configuration run with cmake variables.
This will modify the installation process:
To change the installation directory you use the following configuration variable:
$ cmake -DCMAKE_INSTALL_PREFIX=<path-to-installation-dir> .
cmake configuration variables are applied with the -D option and consist of a <name> and a <value>:
You can customize the configuration run with CMake variables.
CMake configuration variables are applied with the `-D` option and consist of a `<name>` and a `<value>`:
$ cmake -D<name>=<value> .
Four more variables can customize the installation process.
The following table lists them and their defaults plus the `CMAKE_INSTALL_PREFIX`:
To change the installation directory, use the `CMAKE_INSTALL_PREFIX` variable:
CMAKE_INSTALL_PREFIX /usr/local
TIMEW_BINDIR bin
TIMEW_DOCDIR share/doc/timew
TIMEW_RCDIR share/doc/timew/rc
TIMEW_MAN1DIR share/man/man1
TIMEW_MAN5DIR share/man/man5
TIMEW_MAN7DIR share/man/man7
$ cmake -DCMAKE_INSTALL_PREFIX=<path-to-installation-dir> .
The corresponding `TIMEW_*` variables will be combined with `CMAKE_INSTALL_PREFIX` to get absolute installation directories:
This variable defaults to `/usr/local` on UNIX/Linux systems.
CMAKE_INSTALL_PREFIX/TIMEW_BINDIR /usr/local/bin
CMAKE_INSTALL_PREFIX/TIMEW_DOCDIR /usr/local/share/doc/timew
CMAKE_INSTALL_PREFIX/TIMEW_RCDIR /usr/local/share/doc/timew/rc
CMAKE_INSTALL_PREFIX/TIMEW_MAN1DIR /usr/local/share/man/man1
CMAKE_INSTALL_PREFIX/TIMEW_MAN5DIR /usr/local/share/man/man5
CMAKE_INSTALL_PREFIX/TIMEW_MAN7DIR /usr/local/share/man/man7
Five more variables can customize the installation process.
The following table lists them and their default values:
| Variable | Default Value |
|-----------------|-------------------|
| `TIMEW_BINDIR` | `bin` |
| `TIMEW_DOCDIR` | `share/doc/timew` |
| `TIMEW_MANDIR` | `share/man` |
| `TIMEW_MAN1DIR` | `share/man/man1` |
| `TIMEW_MAN7DIR` | `share/man/man7` |
On FreeBSD or DragonFly BSD systems, the `share/` directory is omitted for the `TIMEW_MAN*DIR` variables.
The `TIMEW_*` variables are combined with the value of `CMAKE_INSTALL_PREFIX` to get the absolute paths.
# Updating Timewarrior build
This section concerns itself with the description of the procedure needed to update the local Timewarrior build from the 'timew' git repository.
To update the local Timewarrior build, you need to update the git repository, including the `src/libshared` submodule.
To do that, run:
To update the local Timewarrior build, you need to update the Git repository, including the `src/libshared` submodule, run:
$ git pull --recurse-submodules
$ git submodule update
At this point you have the fully updated sources at your disposal and you can update your local build following the regular build instructions:
At this point you have the fully updated sources at your disposal, and you can update your local build following the regular build instructions:
$ cmake .
$ make
@ -107,7 +100,7 @@ To uninstall Timewarrior, remove the files listed in the `install_manifest.txt`
Timewarrior has dependencies that are detected by CMake in almost all cases, but there are situations and operating systems that mean you will need to offer a little help.
If Timewarrior will not build on your system, first take a look at the Operating System notes below.
If Timewarrior does not build on your system, first take a look at the Operating System notes below.
If this doesn't help, then go to the Troubleshooting section, which includes instructions on how to contact us for help.

View file

@ -1,6 +1,8 @@
Timewarrior - a command line time tracker
MIT license
Copyright 2015 - 2019, Thomas Lauf, Paul Beckingham, Federico Hernandez.
https://opensource.org/licenses/mit-license.php
Copyright 2015 - 2023, Thomas Lauf, Paul Beckingham, Federico Hernandez.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -20,4 +22,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
https://www.opensource.org/licenses/mit-license.php

50
NEWS
View file

@ -1,50 +0,0 @@
New Features in 1.3.0
- Performance improvements
- Switch to python 3
- New hint ':fortnight'
- Pass interval id to extensions
New Commands in 1.3.0
- None
New Configuration Options 1.3.0
- None
Newly Deprecated Features in 1.3.0
- None
Removed Features in 1.3.0
- None
Known Issues
- See https://github.com/GothenburgBitFactory/timewarrior/issues
Timewarrior has been built and tested on the following configurations:
* Arch
* CentOS
* Debian
* Fedora
* Gentoo
* openSUSE
* Ubuntu
* macOS
---
While Timewarrior has undergone testing, bugs are sure to remain.
If you find a bug, please enter a new issue at:
https://github.com/GothenburgBitFactory/timewarrior/issues
Or just send a message to:
support@gothenburgbitfactory.org
Thank you.

View file

@ -1,71 +1,101 @@
# Timewarrior
<div align="center">
<img alt="Timewarrior logo" src="https://avatars.githubusercontent.com/u/36100920?s=200&u=24da05914c20c4ccfe8485310f7b83049407fa9a&v=4">
<br>
[![Build Status](https://travis-ci.org/GothenburgBitFactory/timewarrior.svg?branch=dev)](https://travis-ci.org/GothenburgBitFactory/timewarrior)
[![Tests](https://github.com/GothenburgBitFactory/timewarrior/actions/workflows/tests.yaml/badge.svg)](https://github.com/GothenburgBitFactory/timewarrior/actions/workflows/tests.yaml)
[![Release](https://img.shields.io/github/v/release/GothenburgBitFactory/timewarrior)](https://github.com/GothenburgBitFactory/timewarrior/releases/latest)
[![Release date](https://img.shields.io/github/release-date/GothenburgBitFactory/timewarrior)](https://github.com/GothenburgBitFactory/timewarrior/releases/latest)
![Commits since release](https://img.shields.io/github/commits-since/GothenburgBitFactory/timewarrior/latest)
<br>
[![Twitter](https://img.shields.io/twitter/follow/timewarrior_net?style=social)](https://twitter.com/timewarrior_net)
</div>
# Timewarrior
![macOS downloads](https://img.shields.io/homebrew/installs/dy/timewarrior?label=macOS%20downloads)
![GitHub downloads](https://img.shields.io/github/downloads/GothenburgBitFactory/timewarrior/total?label=GitHub%20downloads)
![Linux downloads](https://img.shields.io/badge/Linux%20downloads-unknown-gray)
Thank you for taking a look at Timewarrior!
Timewarrior is a time tracking utility that offers simple stopwatch features as well as sophisticated calendar-based backfill, along with flexible reporting.
It is a portable, well supported and very active Open Source project.
It is a portable, well-supported and very active Open Source project.
Please visit [timewarrior.net](https://timewarrior.net/docs/) for extensive documentation, downloads, news and more.
## Installing
[![Arch Linux](https://img.shields.io/archlinux/v/extra/x86_64/timew)](https://archlinux.org/packages/extra/x86_64/timew/)
[![Debian](https://img.shields.io/debian/v/timewarrior/testing)](https://packages.debian.org/search?keywords=timewarrior&searchon=names&suite=all&section=all)
[![Fedora](https://img.shields.io/fedora/v/timew)](https://bodhi.fedoraproject.org/updates/?packages=timew)
[![Homebrew](https://img.shields.io/homebrew/v/timewarrior)](https://formulae.brew.sh/formula/timewarrior#default)
[![Ubuntu](https://img.shields.io/ubuntu/v/timew)](https://packages.ubuntu.com/search?keywords=timewarrior&searchon=names&suite=hirsute&section=all)
### From Package
Thanks to the community, there are binary packages available [here](https://timewarrior.net/docs/download.html#distributions).
Thanks to the community, there are binary packages available [here](https://timewarrior.net/docs/install/#distributions).
### Building Timewarrior
Building Timewarrior yourself requires
* git
* cmake
* make
* C++ compiler, currently gcc 4.8.1+ or clang 3.3+ for full C++11 support
* Python 3, for running the testsuite
* Git
* CMake (>= 3.8)
* Make
* C++ compiler with full C++17 support, currently GCC 8+ or Clang 5+
* Python 3 (for running the testsuite)
* Asciidoctor (for creating documentation)
There are two ways to retrieve the Timewarrior sources:
* Clone the repository from Github,
* Clone the repository from GitHub and update required submodules,
```
git clone --recurse-submodules https://github.com/GothenburgBitFactory/timewarrior
cd timewarrior
```
* Or download the tarball with curl,
curl -O https://taskwarrior.org/download/timew-1.1.1.tar.gz
```
curl -O https://github.com/GothenburgBitFactory/timewarrior/releases/download/v1.8.0/timew-1.8.0.tar.gz
```
and expand the tarball
tar xzf timew-1.1.1.tar.gz
cd timew-1.1.1
Build Timewarrior, optionally run the test suite (note: the tarball does not contain tests), and install it.
cmake -DCMAKE_BUILD_TYPE=release
make
[make test]
sudo make install
```
tar xzf timew-1.8.0.tar.gz
cd timew-1.8.0
```
Build Timewarrior, optionally run the test suite, and install it.
```
cmake -DCMAKE_BUILD_TYPE=release .
make
[make test]
sudo make install
```
This copies files into the right place (default under `/usr/local`), and installs man pages.
Add the optional parameter `-DCMAKE_INSTALL_PREFIX=/path/to/your/install/location` to the `cmake` command if you want to install Timewarrior at a location other than `/usr/local`.
The `make install` command may not require `sudo` depending on your choice of install location.
## Documentation
## Community
[![Twitter](https://img.shields.io/twitter/follow/timewarrior_net?style=social)](https://twitter.com/timewarrior_net)
[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/taskwarrior?style=social)](https://reddit.com/r/taskwarrior/)
[![Libera.chat](https://img.shields.io/badge/IRC%20libera.chat-online-green)](https://web.libera.chat/#taskwarrior)
[![Discord](https://img.shields.io/discord/796949983734661191?label=discord)](https://discord.gg/HYpSAeVH)
[![GitHub discussions](https://img.shields.io/github/discussions/GothenburgBitFactory/timewarrior?label=GitHub%20discussions)](https://github.com/GothenburgBitFactory/timewarrior/discussions)
There is extensive online documentation.
You'll find all the details at [timewarrior.net/docs/](https://timewarrior.net/docs/).
Timewarrior has a lively community on many places on the internet.
The project has its own Twitter account, and shares community spaces on IRC and Discord with [Taskwarrior](https://github.com/GothenburgBitFactory/taskwarrior).
There you will find the documentation, downloads, news and more.
Best place to ask questions is our [discussions forum on GitHub](https://github.com/GothenburgBitFactory/timewarrior/discussions).
For other support options, take a look at [timewarrior.net/support](https://timewarrior.net/support)
## Contributing
[![Contributors](https://img.shields.io/github/contributors/GothenburgBitFactory/timewarrior)](https://github.com/GothenburgBitFactory/timewarrior/graphs/contributors)
[![Milestone progress](https://img.shields.io/github/milestones/progress/GothenburgBitFactory/timewarrior/11?label=current%20milestone%20issues)](https://github.com/GothenburgBitFactory/timewarrior/milestone/11)
[![Good first issues](https://img.shields.io/github/issues/GothenburgBitFactory/timewarrior/good%20first%20issue)](https://github.com/GothenburgBitFactory/timewarrior/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
Your contributions are especially welcome.
Whether it comes in the form of code patches, ideas, discussion, bug reports, encouragement or criticism, your input is needed.
Contributions are greatly appreciated.
Whether in the form of code patches, ideas, discussion, bug reports, encouragement or criticism, we need you!
For support options, take a look at [CONTRIBUTING.md](CONTRIBUTING.md) or visit [taskwarrior.org](https://taskwarrior.org/support).
For support options, take a look at [CONTRIBUTING.md](CONTRIBUTING.md) or visit [timewarrior.net](https://timewarrior.net/support).
Visit [Github](https://github.com/GothenburgBitFactory/timewarrior) and participate in the future of Timewarrior.
Visit [GitHub](https://github.com/GothenburgBitFactory/timewarrior) and participate in the future of Timewarrior.
## License

View file

@ -11,9 +11,6 @@
#define CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}"
/* Installation details */
#define TIMEW_RCDIR "${CMAKE_INSTALL_PREFIX}/${TIMEW_RCDIR}"
/* git information */
#cmakedefine HAVE_COMMIT
@ -45,4 +42,3 @@
#cmakedefine HAVE_GET_CURRENT_DIR_NAME
#cmakedefine HAVE_TIMEGM
#cmakedefine HAVE_UUID_UNPARSE_LOWER

View file

@ -1,30 +1,10 @@
message ("-- Configuring C++11")
message ("-- System: ${CMAKE_SYSTEM_NAME}")
include (CheckCXXCompilerFlag)
# NOTE: Phase out -std=gnu++0x and --std=c++0x as soon as realistically possible.
CHECK_CXX_COMPILER_FLAG("-std=c++11" _HAS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" _HAS_CXX0X)
CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" _HAS_GNU0X)
if (_HAS_CXX11)
set (_CXX11_FLAGS "-std=c++11")
elseif (_HAS_CXX0X)
message (WARNING "Enabling -std=c++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.")
set (_CXX11_FLAGS "-std=c++0x")
elseif (_HAS_GNU0X)
message (WARNING "Enabling -std=gnu++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.")
set (_CXX11_FLAGS "-std=gnu++0x")
else (_HAS_CXX11)
message (FATAL_ERROR "C++11 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@gothenburgbitfactory.org.")
endif (_HAS_CXX11)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (LINUX true)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set (DARWIN true)
set (_CXX11_FLAGS "${_CXX11_FLAGS} -stdlib=libc++")
set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
set (KFREEBSD true)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
@ -41,13 +21,8 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
set (GNUHURD true)
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "CYGWIN")
set (CYGWIN true)
# NOTE: Not setting -std=gnu++0x leads to compile errors even with
# GCC 4.8.3, and debugging those leads to insanity. Adding this
# workaround instead of fixing Cygwin.
set (_CXX11_FLAGS "-std=gnu++0x")
else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (UNKNOWN true)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (CMAKE_CXX_FLAGS "${_CXX11_FLAGS} ${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "-Wall -Wextra -Wsign-compare -Wreturn-type ${CMAKE_CXX_FLAGS}")

View file

@ -0,0 +1,16 @@
message (CHECK_START "Detecting Asciidoctor")
FIND_PROGRAM(ASCIIDOCTOR_EXECUTABLE asciidoctor
PATHS "/usr/bin" "/usr/sbin")
MARK_AS_ADVANCED(ASCIIDOCTOR_EXECUTABLE)
if (ASCIIDOCTOR_EXECUTABLE)
message(CHECK_PASS "found")
message(DEBUG "Found executable ${ASCIIDOCTOR_EXECUTABLE}")
set(ASCIIDOCTOR_FOUND "YES")
else (ASCIIDOCTOR_EXECUTABLE)
message(CHECK_FAIL "not found")
message(NOTICE " Could not find Asciidoctor!")
set(ASCIIDOCTOR_FOUND "NO")
endif (ASCIIDOCTOR_EXECUTABLE)

View file

@ -1,9 +1,13 @@
# Shell completion
# Shell completions
The script here is taken from a separate project.
Issues and pull-requests should go there.
The updated version will then be included here.
The completion scripts here are taken from separate projects.
Issues and pull-requests regarding those should go there.
The updated version of each script will then be included here.
If you are missing a completion, feel free to contribute.
* `timew-completion.bash` is taken from https://github.com/lauft/timew-bashcompletion which is released under [MIT license](https://github.com/lauft/timew-bashcompletion/blob/master/LICENSE)
* `timew.fish` is taken from [pfmephisto/timew-fishcompletion](https://github.com/pfmephisto/timew-fishcompletion) which is released under [MIT license](https://github.com/pfmephisto/timew-fishcompletion/blob/main/LICENSE)
* `timew-completion.bash` is taken from [lauft/timew-bashcompletion](https://github.com/lauft/timew-bashcompletion) which is released under [MIT license](https://github.com/lauft/timew-bashcompletion/blob/master/LICENSE)
* `timew.zsh` is taken from [ianmkenney/timewarrior_zsh_completion](https://github.com/ianmkenney/timewarrior_zsh_completion) which is released under [MIT license](https://github.com/ianmkenney/timewarrior_zsh_completion/blob/main/LICENSE)
Huge thanks to everyone contributing! ❤️

View file

@ -1,10 +1,10 @@
# Bash completion for TimeWarrior
# Bash completion for Timewarrior
#
# Copyright (C) 2017 - 2020 Thomas Lauf
# Copyright (C) 2017 - 2020, 2023, Thomas Lauf
#
function __get_commands()
{
echo "annotate cancel config continue day delete diagnostics export extensions gaps get help join lengthen modify month move report resize shorten show split start stop summary tag tags track undo untag week"
echo "annotate cancel config continue day delete diagnostics export extensions gaps get help join lengthen modify month move report resize retag shorten show split start stop summary tag tags track undo untag week"
}
function __get_subcommands()
@ -42,7 +42,7 @@ function __get_ids()
function __get_tags()
{
timew tags | tail -n +4 -- | sed -e "s|[[:space:]]*-$||"
timew get dom.tracked.tags "${TIMEW_COMPLETION_TAGS_RANGE:-":all"}"
}
function __get_extensions()
@ -63,7 +63,8 @@ function __has_entered_id()
function __has_entered_subcommand()
{
local subcommands=$( __get_subcommands "${1}" )
local subcommands
subcommands=$( __get_subcommands "${1}" )
for word in "${COMP_WORDS[@]}" ; do
for cmd in ${subcommands} ; do
@ -78,7 +79,8 @@ function __has_entered_subcommand()
function __has_entered_help_item()
{
local items=$( __get_help_items )
local items
items=$( __get_help_items )
for word in "${COMP_WORDS[@]:2}" ; do
for item in ${items} ; do

197
completion/timew.fish Normal file
View file

@ -0,0 +1,197 @@
# fish completion for timewarrior
# https://timewarrior.net/
# put this file in ~/.config/fish/completions/
function __fish_timew_get_commands
timew help | sed -e '/^Usage:/d' -e '/^Additional help:/Q' \
-e 's/timew \[*\([a-z]\+\)\]*.*/\1/g;tx;d;:x' | string trim
end
function __fish_timew_get_tags
timew tags | tail -n+4 | awk '{sub(/-([^-]*)$/, "\\1"); print}' | awk '!/^[[:space:]]*$/' | awk '{$1=$1};1' | awk '{ print "\'"$0"\'"}'
end
function __fish_timew_get_ids
timew summary :ids | sed -e 's/.*@\([0-9]\+\).*/@\1/g;tx;d;:x'
end
function __fish_timew_get_reports
timew extensions | sed -e 's/^\(.*\).*Active/\1/g;tx;d;:x'
end
# Interval:
# [from] <date>
# [from] <date> to/- <date>
# [from] <date> for <duration>
# <duration> before/after <date>
# <duration> ago
# [for] <duration>
# timew show | sed -n '/\s\s.*:/p'
set -l commands (__fish_timew_get_commands)
set -l reports (__fish_timew_get_reports)
set -l ids (__fish_timew_get_ids)
set -l tags (__fish_timew_get_tags)
set -l intervals ""
set -l durations ""
set -l dates ""
set -l start_end "start end"
complete -c timew -f
complete -c timew -l version -d 'Print a short version string and exit'
set -l commands_with_description "
cancel\t'Cancel time tracking'
diagnostics\t'Show diagnostic information'
extensions\t'List available extensions'
show\t 'Display configuration'
undo\t'Revert Timewarrior commands'
annotate\t'Add an annotation to intervals'
config\t'Get and set Timewarrior configuration'
continue\t'Resume tracking of existing interval'
day\t'Display chart report'
delete\t'Delete intervals'
export\t'Export tracked time in JSON'
gaps\t'Display time tracking gaps'
get\t'Display DOM values'
help\t'Display help'
week\t'Display chart report'
join\t'Join intervals'
lengthen\t'Lengthen intervals'
modify\t'Change start or end date of an interval'
month\t'Display chart report'
move\t'Change interval start-time'
shorten\t'Shorten intervals'
split\t'Split intervals'
start\t'Start time tracking'
stop\t'Stop time tracking'
summary\t'Display a time-tracking summary'
tag\t'Add tags to intervals'
tags\t'Display a list of tags'
track\t'Add intervals to the database'
untag\t'Remove tags from intervals'
week\t'Display chart report'
"
# Base Commands
complete -c timew -n "not __fish_seen_subcommand_from $commands" \
-a "$commands_with_description" \
-d "Timewarrior command"
complete -c timew -n "not __fish_seen_subcommand_from $commands" \
-a "$reports" \
-d "Report"
# Subcomands
complete -c timew -n "__fish_seen_subcommand_from annotate" \
-a "$ids"
# @<id> [@<id> ...] <annotation>
complete -c timew -n "__fish_seen_subcommand_from config" \
-a ""
#[<name> [<value> | '']]
complete -c timew -n "__fish_seen_subcommand_from continue" \
-a "$ids"
#[@<id>] [<date>|<interval>]
complete -c timew -n "__fish_seen_subcommand_from day" \
-a "$tags"
#[<interval>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from delete" \
-a "$ids"
#@<id> [@<id> ...]
complete -c timew -n "__fish_seen_subcommand_from export" \
-a "$tags"
#[<interval>] [<tag> ...]
#
complete -c timew -n "__fish_seen_subcommand_from gaps" \
-a "$tags"
# [<interval>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from get" \
-a ""
# <DOM> [<DOM> ...]
complete -c timew -n "__fish_seen_subcommand_from join" \
-a "$ids"
# @<id> @<id>
complete -c timew -n "__fish_seen_subcommand_from lengthen" \
-a "$ids"
# @<id> [@<id> ...] <duration>
complete -c timew -n "__fish_seen_subcommand_from modify && not __fish_seen_subcommand_from $start_end" \
-a "start end"
# (start|end) @<id> <date>
complete -c timew -n "__fish_seen_subcommand_from modify && __fish_seen_subcommand_from $start_end" \
-a "$ids"
# (start|end) @<id> <date>
complete -c timew -n "__fish_seen_subcommand_from month" \
-a "$tags"
# [<interval>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from move" \
-a "$ids"
# @<id> <date>
complete -c timew -n "__fish_seen_subcommand_from $reports" \
-a "$tags $interval"
# <report> [<interval>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from shorten" \
-a "$ids"
# @<id> [@<id> ...] <duration>
complete -c timew -n "__fish_seen_subcommand_from split" \
-a "$ids"
# @<id> [@<id> ...]
complete -c timew -n "__fish_seen_subcommand_from start && not __fish_seen_subcommand_from modify" \
-a "$tags $dates"
# [<date>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from stop && not __fish_seen_subcommand_from modify" \
-a "$tags"
# [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from summary" \
-a "$tags $intervals"
# [<interval>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from tag" \
-a "$ids $tags"
# @<id> [@<id> ...] <tag> [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from tags" \
-a "$tags $intervals"
# [<interval>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from track" \
-a "$tags $intervals"
# <interval> [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from untag" \
-a "$ids $tags"
# @<id> [@<id> ...] <tag> [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from week" \
-a "$tags $intervals"
# [<interval>] [<tag> ...]
complete -c timew -n "__fish_seen_subcommand_from help" \
-a "$commands dates dom durations hints ranges" \
-d "Show help"

120
completion/timew.zsh Normal file
View file

@ -0,0 +1,120 @@
#compdef _timew timew
# zsh completion for timewarrior 1.7.1
# timewarrior_zsh_completion v0.1.0
_timew() {
local ret=1
if [ -d ${HOME}/.local/share/timewarrior/data ]; then
data_dir="${HOME}/.local/share/timewarrior/data"
fi
if [ -d ${HOME}/.timewarrior/data ]; then
data_dir="${HOME}/.timewarrior/data"
fi
if (( !${+data_dir} )); then
echo "\nCould not find data directory"
return $ret
fi
_arguments -C \
'1:command:->commands' \
'*:ids_tags_hints:->ids_tags_hints' && ret=0
case "$state" in
commands)
_describe 'commands' _commands
;;
ids_tags_hints)
local arr
arr=()
# collect all tag data
vals=$(sed '1,1d' $data_dir/tags.data | \
sed '$d' | \
sed -E "s;^[[:space:]]+\"([[:space:][:alnum:]\._-]+)\":.*$;\1;g")
# add all of the tags to the output array
for i in ${(f)vals}; do arr+=$i; done
# append the predefined hints to the end
arr+=( "${_hints[@]} ")
vals=$(cat ${data_dir}/*-*.data | tail -n 9 | sed -E "s/inc .+# //g")
typeset -i count
count=$(echo $vals | wc -l)
for i in ${(f)vals};
do
arr+="@${count}:${i}"
((count--))
done
_describe 'hints_tags_ids' arr
;;
esac
}
_hints=(
"\:adjust:Automatically correct overlaps"
"\:blank:Leaves tracked time out of a report"
"\:color:Force color on, even if not connected to a TTY"
"\:day:The 24 hours of the current day"
"\:debug:Runs in debug mode, shows many runtime details"
"\:fill:Expand time to fill surrounding available gap"
"\:ids:Displays interval ID numbers in the summary report"
"\:lastmonth:Last month"
"\:lastquarter:Last quarter"
"\:lastweek:Last week"
"\:lastyear:Last year"
"\:month:This month"
"\:nocolor:Force color off, even if connected to a TTY"
"\:quarter:This quarter"
"\:quiet:Turns off all feedback. For automation"
"\:week:This week"
"\:year:This year"
"\:yes:Overrides confirmation by answering \'yes\' to the questions"
"\:yesterday:The 24 hours of the previous day"
)
_commands=(
'annotate:add an annotation to intervals'
'cancel:cancel time tracking'
'config:get and set Timewarrior configuration'
'continue:resume tracking of existing interval'
'day:Summarize the tracked and untracked time over the day'
'day:shows a chart depicting a single day (today by default)'
'delete:delete intervals'
'diagnostics:show diagnostic information'
'export:export tracked time in JSON'
'extensions:list available extensions'
'fill:adjust intervals to fill in surrounding gaps'
'gaps:display time tracking gaps'
'get:display DOM values'
'help:display help'
'join:join intervals'
'lengthen:lengthen intervals'
'modify:change start or end date of an interval'
'month:Summarize the tracked and untracked time over a month'
'month:shows a chart depicting a single month (current month by default)'
'move:change interval start-time'
'report:run an extension report'
'resize:set interval duration'
'revert:revert Timewarrior commands'
'shorten:shorten intervals'
'show:display configuration'
'split:split intervals'
'start:start time tracking'
'stop:stop time tracking'
'summary:display a time-tracking summary'
'tag:add tags to intervals'
'tags:display a list of tags'
'track:add intervals to the database'
'untag:remove tags from intervals'
'week:shows a chart depicting a single week (current week by default)'
)

View file

@ -1,51 +1,16 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 3.10)
message ("-- Configuring documentation")
add_subdirectory (holidays)
add_subdirectory (themes)
configure_file (man1/timew.1.in man1/timew.1)
configure_file (man1/timew-annotate.1.in man1/timew-annotate.1)
configure_file (man1/timew-cancel.1.in man1/timew-cancel.1)
configure_file (man1/timew-chart.1.in man1/timew-chart.1)
configure_file (man1/timew-config.1.in man1/timew-config.1)
configure_file (man1/timew-continue.1.in man1/timew-continue.1)
configure_file (man1/timew-day.1.in man1/timew-day.1)
configure_file (man1/timew-delete.1.in man1/timew-delete.1)
configure_file (man1/timew-diagnostics.1.in man1/timew-diagnostics.1)
configure_file (man1/timew-export.1.in man1/timew-export.1)
configure_file (man1/timew-extensions.1.in man1/timew-extensions.1)
configure_file (man1/timew-fill.1.in man1/timew-fill.1)
configure_file (man1/timew-gaps.1.in man1/timew-gaps.1)
configure_file (man1/timew-get.1.in man1/timew-get.1)
configure_file (man1/timew-help.1.in man1/timew-help.1)
configure_file (man1/timew-join.1.in man1/timew-join.1)
configure_file (man1/timew-lengthen.1.in man1/timew-lengthen.1)
configure_file (man1/timew-modify.1.in man1/timew-modify.1)
configure_file (man1/timew-month.1.in man1/timew-month.1)
configure_file (man1/timew-move.1.in man1/timew-move.1)
configure_file (man1/timew-report.1.in man1/timew-report.1)
configure_file (man1/timew-resize.1.in man1/timew-resize.1)
configure_file (man1/timew-shorten.1.in man1/timew-shorten.1)
configure_file (man1/timew-show.1.in man1/timew-show.1)
configure_file (man1/timew-split.1.in man1/timew-split.1)
configure_file (man1/timew-start.1.in man1/timew-start.1)
configure_file (man1/timew-stop.1.in man1/timew-stop.1)
configure_file (man1/timew-summary.1.in man1/timew-summary.1)
configure_file (man1/timew-tag.1.in man1/timew-tag.1)
configure_file (man1/timew-tags.1.in man1/timew-tags.1)
configure_file (man1/timew-track.1.in man1/timew-track.1)
configure_file (man1/timew-undo.1.in man1/timew-undo.1)
configure_file (man1/timew-untag.1.in man1/timew-untag.1)
configure_file (man1/timew-week.1.in man1/timew-week.1)
if (ASCIIDOCTOR_FOUND)
set (ASCIIDOCTOR_OPTIONS "--attribute=manmanual=User Manuals"
"--attribute=mansource=timew ${PROJECT_VERSION}")
endif (ASCIIDOCTOR_FOUND)
configure_file (man7/timew-config.7.in man7/timew-config.7)
configure_file (man7/timew-dates.7.in man7/timew-dates.7)
configure_file (man7/timew-dom.7.in man7/timew-dom.7)
configure_file (man7/timew-durations.7.in man7/timew-durations.7)
configure_file (man7/timew-hints.7.in man7/timew-hints.7)
configure_file (man7/timew-ranges.7.in man7/timew-ranges.7)
add_subdirectory (man1)
add_subdirectory (man7)
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man1/ DESTINATION ${TIMEW_MAN1DIR} FILES_MATCHING PATTERN "*.1")
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man7/ DESTINATION ${TIMEW_MAN7DIR} FILES_MATCHING PATTERN "*.7")
add_custom_target (doc ALL DEPENDS man1 man7)

View file

@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 3.10)
message ("-- Configuring holiday documentation")
install (FILES README DESTINATION ${TIMEW_DOCDIR}/doc/holidays)
install (FILES holidays.en-US DESTINATION ${TIMEW_DOCDIR}/doc/holidays)
install (FILES refresh DESTINATION ${TIMEW_DOCDIR}/doc/holidays)
install (FILES README DESTINATION ${TIMEW_DOCDIR}/holidays)
install (FILES holidays.en-US DESTINATION ${TIMEW_DOCDIR}/holidays)
install (FILES refresh DESTINATION ${TIMEW_DOCDIR}/holidays)

View file

@ -1,27 +1,35 @@
# Timewarrior Holiday Files
The holiday files were created by the `refresh` script using data from https://holidata.net.
The holiday files can be updated using the command:
The holiday files were created by the `refresh` script using data from [holidata.net](https://holidata.net).
They can be updated using the following command:
$ ./refresh
```shell
$ ./refresh
```
This updates all present holiday files with holiday data for the current and the following year (default).
If you need another locale (for example `sv-SE`), do this:
$ ./refresh --locale sv-SE
```shell
$ ./refresh --locale sv-SE
```
This creates a file `holidays.sv-SE` containing holiday data for the current and following year.
The id for the locale is composed from the [ISO 639-1 language code](https://en.wikipedia.org/wiki/ISO_639-1) and the [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
The id for the locale is composed of the [ISO 639-1 language code](https://en.wikipedia.org/wiki/ISO_639-1) and the [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
If you need a specific locale region, do this:
$ ./refresh --locale de-CH --region BE
```shell
$ ./refresh --locale de-CH --region BE
```
For regions use the corresponding [ISO 3166-2 code for principal subdivisions](https://en.wikipedia.org/wiki/ISO_3166-2).
To specify a set of years to update, do this:
$ ./refresh --locale en-US --year 2018 2019 2020
```shell
$ ./refresh --locale en-US --year 2020 2021 2022
```
If the locale is not yet supported by holidata.net, or there is no data available for the requested year, you will see an error.
If the locale is not yet supported by [holidata.net](https://holidata.net), or there is no data available for the requested year, you will see an error.

View file

@ -1,30 +1,31 @@
# Holiday data provided by holidata.net
# Generated 2018-01-13T00:44:23
# Generated 2021-05-28T12:07:28
define holidays:
en-US:
2017_01_01 = New Year's Day
2017_01_02 = New Year's Day (observed)
2017_01_16 = Birthday of Martin Luther King, Jr.
2017_02_20 = Washington's Birthday
2017_04_17 = Patriots' Day
2017_05_29 = Memorial Day
2017_07_04 = Independence Day
2017_09_04 = Labor Day
2017_10_09 = Columbus Day
2017_11_11 = Veterans Day
2017_11_23 = Thanksgiving Day
2017_12_25 = Christmas Day
2020_01_01 = New Year's Day
2020_01_20 = Birthday of Martin Luther King, Jr.
2020_02_17 = Washington's Birthday
2020_04_20 = Patriots' Day
2020_05_25 = Memorial Day
2020_07_04 = Independence Day
2020_09_07 = Labor Day
2020_10_12 = Columbus Day
2020_11_11 = Veterans Day
2020_11_26 = Thanksgiving Day
2020_11_27 = Day after Thanksgiving
2020_12_24 = Christmas Eve
2020_12_25 = Christmas Day
2018_01_01 = New Year's Day
2018_01_15 = Birthday of Martin Luther King, Jr.
2018_02_19 = Washington's Birthday
2018_04_16 = Patriots' Day
2018_05_28 = Memorial Day
2018_07_04 = Independence Day
2018_09_03 = Labor Day
2018_10_08 = Columbus Day
2018_11_11 = Veterans Day
2018_11_22 = Thanksgiving Day
2018_12_25 = Christmas Day
2021_01_01 = New Year's Day
2021_01_18 = Birthday of Martin Luther King, Jr.
2021_02_15 = Washington's Birthday
2021_04_19 = Patriots' Day
2021_05_31 = Memorial Day
2021_07_04 = Independence Day
2021_09_06 = Labor Day
2021_10_11 = Columbus Day
2021_11_11 = Veterans Day
2021_11_25 = Thanksgiving Day
2021_12_25 = Christmas Day

View file

@ -2,7 +2,7 @@
###############################################################################
#
# Copyright 2016, 2018 - 2020, Thomas Lauf, Paul Beckingham, Federico Hernandez.
# Copyright 2016, 2018 - 2022, Gothenburg Bit Factory
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@ -26,96 +26,119 @@
#
###############################################################################
import argparse
import datetime
import json
import os
import re
from textwrap import dedent
from urllib.error import HTTPError
from urllib.request import urlopen
import argparse
def gather_locale_files(path):
"""Enumerate all holiday files in the current directory."""
locale_file_map = {}
re_holiday_file = re.compile(r"/holidays.([a-z]{2}-[A-Z]{2})$")
for file in enumerate(path):
result = re_holiday_file.search(file)
if result:
# Extract the locale name.
locale_file_map[result.group(1)] = file
return locale_file_map
def enumerate(path):
if not os.path.exists(path):
raise Exception("Directory '{}' does not exist".format(path))
raise Exception(f"Directory '{path}' does not exist")
found = []
for path, dirs, files in os.walk(path, topdown=True, onerror=None, followlinks=False):
found.extend([os.path.join(path, x) for x in files])
return found
def holidata(locale, year):
return "https://holidata.net/{}/{}.json".format(locale, year)
def create_locale_files(path, locales):
locale_file_map = {}
for locale in locales:
locale_file_map[locale] = os.path.join(path, f"holidays.{locale}")
return locale_file_map
def update_locales(locales, regions, years):
def update_locale_files(locales, regions, years):
now = datetime.datetime.now()
if not years:
years = [now.year, now.year + 1]
for locale in locales:
with open("holidays.{}".format(locale), "w") as fh:
fh.write("# Holiday data provided by holidata.net\n")
fh.write("# Generated {:%Y-%m-%dT%H:%M:%S}\n\n".format(now))
fh.write("define holidays:\n")
fh.write(" {}:\n".format(locale))
for locale, file in locales.items():
with open(file, "w") as fh:
fh.write(dedent(f"""\
# Holiday data provided by holidata.net
# Generated {now:%Y-%m-%dT%H:%M:%S}
define holidays:
{locale}:
"""))
for year in years:
holidays = dict()
url = holidata(locale, year)
print(url)
try:
lines = urlopen(url).read().decode("utf-8")
for line in lines.split('\n'):
if line:
j = json.loads(line)
if not j['region'] or not regions or j['region'] in regions:
day = j['date'].replace("-", "_")
desc = j['description']
holidays[day] = desc
holidays = get_holidata(locale, regions, year)
for date, desc in holidays.items():
fh.write(" {} = {}\n".format(date, desc))
fh.write(f" {date} = {desc}\n")
fh.write('\n')
fh.write("\n")
except HTTPError as e:
if e.code == 404:
print("holidata.net does not have data for {}, for {}.".format(locale, year))
print(f"holidata.net does not have data for {locale}, for {year}.")
else:
print(e.code, e.read())
def main(args):
if args.locale:
update_locales(args.locale, args.region, args.year)
else:
# Enumerate all holiday files in the current directory.
locales = []
re_holiday_file = re.compile(r"/holidays.([a-z]{2}-[A-Z]{2}$)")
for file in enumerate('.'):
result = re_holiday_file.search(file)
if result:
# Extract the locale name.
locales.append(result.group(1))
def get_holidata(locale, regions, year):
url = f"https://holidata.net/{locale}/{year}.json"
print(url)
holidays = dict()
lines = urlopen(url).read().decode("utf-8")
update_locales(locales, args.region, args.year)
for line in lines.split("\n"):
if line:
j = json.loads(line)
if not j["region"] or not regions or j["region"] in regions:
day = j["date"].replace("-", "_")
desc = j["description"]
holidays[day] = desc
return holidays
def main(args):
locale_files = create_locale_files(args.path, args.locale) if args.locale else gather_locale_files(args.path)
update_locale_files(locale_files, args.region, args.year)
if __name__ == "__main__":
usage = """See https://holidata.net for details of supported locales and regions."""
parser = argparse.ArgumentParser(
description="Update holiday data files. Simply run 'refresh' to update all of them.")
parser.add_argument('--locale', nargs='+', help='Specific locale to update.')
parser.add_argument('--region', nargs='+', help='Specific locale region to update.', default=[])
parser.add_argument('--year', nargs='+', help='Specific year to fetch.', type=int, default=[])
args = parser.parse_args()
description="Update holiday data files. Simply run 'refresh' to update all of them.",
usage="refresh [-h] [path] [--locale LOCALE [LOCALE ...]] [--region REGION [REGION ...]] [--year YEAR [YEAR ...]]"
)
parser.add_argument("--locale", nargs="+", help="specify locale to update")
parser.add_argument("--region", nargs="+", help="specify locale region to update", default=[])
parser.add_argument("--year", nargs="+", help="specify year to fetch (defaults to current and next year)", type=int, default=[])
parser.add_argument("path", nargs="?", help="base path to search for locales (defaults to current directory)", default=".")
try:
main(args)
main(parser.parse_args())
except Exception as msg:
print('Error:', msg)
print("Error:", msg)

3
doc/man1/.gitignore vendored
View file

@ -1 +1,4 @@
*.[0-9]
!timew-day.1
!timew-month.1
!timew-week.1

24
doc/man1/CMakeLists.txt Normal file
View file

@ -0,0 +1,24 @@
cmake_minimum_required (VERSION 3.10)
if (ASCIIDOCTOR_FOUND)
file (GLOB DOC_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.1.adoc")
set (DOC_FILES)
foreach (SRC IN LISTS DOC_SOURCES)
string (REPLACE ".adoc" "" OUTPUT_FILE_NAME "${SRC}")
string (REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" OUTPUT_FILE_NAME "${OUTPUT_FILE_NAME}")
add_custom_command (OUTPUT "${OUTPUT_FILE_NAME}"
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage ${ASCIIDOCTOR_OPTIONS} "${SRC}" -o "${OUTPUT_FILE_NAME}"
DEPENDS "${SRC}")
list (APPEND DOC_FILES "${OUTPUT_FILE_NAME}")
endforeach (SRC)
add_custom_target (man1 DEPENDS ${DOC_FILES})
else (ASCIIDOCTOR_FOUND)
file (GLOB MAN_PAGES "${CMAKE_CURRENT_SOURCE_DIR}/*.1")
set (DOC_FILES ${MAN_PAGES})
endif (ASCIIDOCTOR_FOUND)
install (FILES ${DOC_FILES} DESTINATION ${TIMEW_MAN1DIR})

View file

@ -0,0 +1,80 @@
= timew-annotate(1)
== NAME
timew-annotate - add an annotation to intervals
== SYNOPSIS
[verse]
*timew annotate* [_<id>_**...**] _<annotation>_
== DESCRIPTION
The 'annotate' command is used to add an annotation to an interval.
See the 'summary' command on how to display the _<id>_ and _<annotation>_ of an interval.
== EXAMPLES
*Annotate a single interval*::
+
Call the command with an _id_ and the _annotation_:
+
[source]
----
$ timew annotate @2 'Lorem ipsum'
Annotated @2 with "Lorem ipsum"
----
*Remove an annotation*::
+
Annotating an interval with an empty string removes the annotation:
+
[source]
----
$ timew annotate @1 ''
Removed annotation from @1
----
*Annotate multiple intervals*::
+
You can annotate multiple intervals with the same _annotation_ at once, by specifying their ids:
+
[source]
----
$ timew annotate @2 @10 @23 'Lorem ipsum'
Annotated @1 with "Lorem ipsum"
Annotated @10 with "Lorem ipsum"
Annotated @23 with "Lorem ipsum"
----
*Annotate the current open interval*::
+
If there is active time tracking, you can omit the ID when you want to add an annotation to the current open interval:
+
[source]
----
$ timew start foo
...
$ timew annotate bar
Annotated @1 with "bar"
----
+
This results in the current interval having tag 'foo' and annotation 'bar'.
== pass:[BUGS & LIMITATIONS]
The summary command truncates annotations longer than 15 characters.
To display longer annotations, one can use the 'export' command, or a custom report.
Currently, the annotation command picks the last token from the command line and uses it as annotation.
I.e. using no quotes in an annotation command like
[source]
----
$ timew annotate @1 lorem ipsum
----
will result in interval @1 having only 'ipsum' as its annotation.
Use quotes to avoid this.
== SEE ALSO
**timew-export**(1),
**timew-summary**(1),
**timew-tag**(1)

View file

@ -1,50 +0,0 @@
.TH timew-annotate 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-annotate \- add an annotation to intervals
.
.SH SYNOPSIS
.B timew annotate
[
.I <id>
.B ...
]
.I <annotation>
.B ...
.
.SH DESCRIPTION
The 'annotate' command is used to add an annotation to an interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to annotate.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
Then having selected '@2' as the interval you wish to annotate:
.RS
$ timew annotate @2 'Lorem ipsum...'
.RE
Note that you can annotate multiple intervals with the same annotation:
.RS
$ timew annotate @2 @10 @23 'Lorem ipsum dolor sit amet...'
.RE
If there is active time tracking, you can omit the ID when you want to add annotations to the current open interval:
.RS
$ timew start foo
.br
$ timew annotate bar
.RE
This results in the current interval having annotations 'foo' and 'bar'.
.
.SH BUGS
Currently the annotation command picks the last token from the command line and uses it as annotation.
I.e. using no quotes in an annotation command like
.RS
$ timew annotate @1 lorem ipsum dolor
.RE
will result in interval @1 having only 'dolor' as its annotation.
.
.SH "SEE ALSO"
.BR timew-tag (1)

View file

@ -0,0 +1,37 @@
= timew-cancel(1)
== NAME
timew-cancel - cancel time tracking
== SYNOPSIS
[verse]
*timew cancel*
== DESCRIPTION
If there is an open interval, it is abandoned.
== EXAMPLES
*Cancel with active time tracking*::
+
$ timew start
...
$ timew cancel
Canceled active time tracking.
This deletes the open interval.
*Cancel with no active time tracking*::
+
...
$ timew stop
$ timew cancel
There is no active time tracking.
Cancel has no effect, only a warning is printed.
== SEE ALSO
**timew-continue**(1),
**timew-start**(1),
**timew-stop**(1),
**timew-track**(1)

View file

@ -1,45 +0,0 @@
.TH timew-cancel 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-cancel \- cancel time tracking
.
.SH SYNOPSIS
.B timew cancel
.
.SH DESCRIPTION
If there is an open interval, it is abandoned.
.
.SH EXAMPLES
.TP
.B Cancel with active time tracking
.RS
.br
$ timew start
.br
...
.br
$ timew cancel
.br
Canceled active time tracking.
.RE
.
This deletes the open interval.
.TP
.B Cancel with no active time tracking
.RS
.br
...
.br
$ timew stop
.br
$ timew cancel
.br
There is no active time tracking.
.RE
Cancel has no effect, only a warning is printed.
.
.SH "SEE ALSO"
.BR timew-continue (1),
.BR timew-start (1),
.BR timew-stop (1),
.BR timew-track (1)

View file

@ -1,183 +1,115 @@
.TH timew-chart 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-chart \- display chart report
.
.SH SYNOPSIS
.B timew day
[
.I <range>
] [
.I <tag>
.B ...
]
.br
.B timew month
[
.I <range>
] [
.I <tag>
.B ...
]
.br
.B timew week
[
.I <range>
] [
.I <tag>
.B ...
]
.
.SH DESCRIPTION
= timew-chart(1)
== NAME
timew-chart - display chart report
== SYNOPSIS
[verse]
*timew day* [_<range>_] [_<tag>_**...**]
*timew month* [_<range>_] [_<tag>_**...**]
*timew week* [_<range>_] [_<tag>_**...**]
== DESCRIPTION
A chart summarizes the tracked and untracked time with colored blocks drawn on a timeline.
It accepts date ranges and tags for filtering.
There are three types:
.BR day ", " week ", and " month
with their respective commands.
The
.BI reports. <type> .range
configuration setting overrides the default date range.
There are three types: *day*, *week*, and *month* with their respective commands.
The **reports.**__<type>__**.range** configuration setting overrides the default date range.
One can override the global default date range with the **reports.range** configuration.
For more details, and precise times, use the 'summary' report.
.TP
.B month
*month*::
The month command shows a chart depicting a single month (current month by default).
The default date range shown is
.BR :month .
.
.TP
.B week
The default date range shown is *:month*.
*week*::
The week command shows a chart depicting a single week (current week by default).
The default date range shown is
.BR :week .
.
.TP
.B day
The default date range shown is *:week*.
*day*::
The day command shows a chart depicting a single day (today by default).
The default date range shown is
.BR :day .
.
.SH CONFIGURATION
.IR <type> " is one of"
.BR month ", " week ", " day "."
.TP
.BI reports. <type> .cell
.RS
The default date range shown is *:day*.
== CONFIGURATION
_<type>_ is one of **month**, **week**, **day**.
**reports.**__<type>__**.cell**::
Determines how many minutes are represented by a single character cell, for the charts.
The value must be greater than '0'.
A value of '15' means that an hour is represented by 60/15, or 4 character cells.
Suitable values are the divisors of 60 (30, 20, 15, 12, ...).
.br
Default value is '15'.
.RE
.TP
.BI reports. <type> .day
.RS
**reports.**__<type>__**.day**::
Determines whether the current day of the month is shown at left margin.
.br
Default value is 'yes'.
.RE
.TP
.BI reports. <type> .holidays
.RS
**reports.**__<type>__**.holidays**::
Determines whether relevant holidays are shown beneath the report.
.br
Default value is 'yes'.
.RE
.TP
.BI reports. <type> .hours
.RS
Determines how the <type> report shows all the hours in a day ('all'), or is limited to only hours where data is tracked ('auto').
.br
**reports.**__<type>__**.hours**::
Determines how the <type> report shows all the hours in a day ('all'), or is limited to only hours when data is tracked ('auto').
Default value is 'all'.
.RE
.TP
.BI reports. <type> .lines
.RS
**reports.**__<type>__**.lines**::
Determines how many lines are used to render each day on the <type> report.
.br
Default value is '1'.
.RE
.TP
.BI reports. <type> .month
.RS
**reports.**__<type>__**.month**::
Determines whether the current month is shown at left margin.
.br
Default value is 'yes'.
.RE
.TP
.BI reports. <type> .range
.RS
**reports.**__<type>__**.range**::
For reports that show a range of data, this setting will override the default value.
The value should be a range hint, see
.BR timew-hints (7).
.RE
.TP
.BI reports. <type> .spacing
.RS
**timew-hints**(7).
**reports.**__<type>__**.spacing**::
Specifies how many spaces are inserted between the hours in the <type> report exclusions.
A value of '0' yields a more compact report.
.br
Default value is '1'.
.RE
.TP
.BI reports. <type> .axis
.RS
The value 'internal' puts the hour markers (time line at the top) inside the exclusion blocks, 'external' puts the hour markers in a separate line; additional values might be defined in the future.
.br
**reports.**__<type>__**.axis**::
The value 'internal' puts the hour markers (timeline at the top) inside the exclusion blocks, 'external' puts the hour markers in a separate line; additional values might be defined in the future.
Default is 'internal' for the day report and 'external' for other reports.
.br
.RE
.TP
.BI reports. <type> .summary
.RS
**reports.**__<type>__**.summary**::
Determines whether the hours summary is shown.
.br
Default value is 'on'.
.RE
.TP
.BI reports. <type> .totals
.RS
**reports.**__<type>__**.totals**::
Determines whether the time totals are shown for each day on the report.
.br
Default value is 'on'.
.RE
.TP
.BI reports. <type> .week
.RS
**reports.**__<type>__**.week**::
Determines whether the current week number is shown at left margin.
.br
Default value is 'yes'.
.RE
.TP
.BI reports. <type> .weekday
.RS
**reports.**__<type>__**.weekday**::
Determines whether the current weekday is shown at left margin.
.br
Default value is 'yes'.
.RE
.
.SH HINTS
.TP
.B :blank
**tags.**__<tag>__**.color**::
Assigns a specific foreground and background color to a tag, instead of the default color palette determined by your current theme.
Examples of valid colors include 'white', 'gray8', 'black on yellow', and 'rgb345'.
== HINTS
*:blank*::
The ':blank' hint causes only the excluded time to be shown, with no tracked time.
This can be used to see the exclusions.
.TP
.B :ids
*:ids*::
The ':ids' hint causes the intervals to be displayed with their ids
.
.SH EXAMPLES
Charts accept date ranges and tags for filtering, or shortcut hints:
.RS
$ timew month 1st - today
.br
$ timew week FOO BAR
.br
$ timew day :week
.RE
.
.SH "SEE ALSO"
.BR timew-day (1),
.BR timew-month (1),
.BR timew-summary (1),
.BR timew-week (1)
== EXAMPLES
Charts accept date ranges and/or tags, or ids for filtering:
$ timew month 1st - today
$ timew week FOO BAR
$ timew day @3 @4
See **timew-ranges**(7) and **timew-hints**(7) on the different ways to provide date ranges.
== SEE ALSO
**timew-summary**(1),

View file

@ -0,0 +1,37 @@
= timew-config(1)
== NAME
timew-config - get and set Timewarrior configuration
== SYNOPSIS
[verse]
*timew config* [_<name>_ {_<value>_|*''*}]
== DESCRIPTION
Allows setting and removing configuration values, as an alternative to directly editing your _timewarrior.cfg_ file.
== EXAMPLES
For example:
$ timew config verbose yes
$ timew config verbose ''
$ timew config verbose
The first command sets 'verbose' to 'yes'.
The second sets it to a blank value which overrides the default value.
The third example deletes the 'verbose' setting.
When modifying configuration in this way, interactive confirmation will be sought.
To override this confirmation, use the ':yes' hint, which means you intend to answer 'yes' to the confirmation questions:
$ timew config verbose '' :yes
If no arguments are provided, all configuration settings are shown:
$ timew config
verbose = yes
...
== SEE ALSO
**timew-hints**(7),
**timew-show**(1)

View file

@ -1,49 +0,0 @@
.TH timew-config 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-config \- get and set Timewarrior configuration
.
.SH SYNOPSIS
.B timew config
[
.I <name>
{
.I <value>
|
.B ''
}
]
.
.SH DESCRIPTION
Allows setting and removing configuration values, as an alternative to directly editing your ~/.timewarrior/timewarrior.cfg file.
.
.SH EXAMPLES
For example:
.RS
$ timew config verbose yes
.br
$ timew config verbose ''
.br
$ timew config verbose
.RE
The first command sets 'verbose' to 'yes'.
The second sets it to a blank value which overrides the default value.
The third example deletes the 'verbose' setting.
.
When modifying configuration in this way, interactive confirmation will be sought.
To override this confirmation, use the ':yes' hint, which means you intend to answer 'yes' to the confirmation questions:
.RS
$ timew config verbose '' :yes
.RE
If no arguments are provided, all configuration settings are shown:
.RS
$ timew config
.br
verbose = yes
.br
...
.RE
.
.SH "SEE ALSO"
.BR timew-hints (1),
.BR timew-show (1)

View file

@ -0,0 +1,82 @@
= timew-continue(1)
== NAME
timew-continue - resume tracking of existing interval
== SYNOPSIS
[verse]
*timew continue* [_<id>_|_<tag>_**...**] [_<datetime>_|_<range>_]
== DESCRIPTION
The 'continue' command is used to resume tracking specified by a closed interval.
This command is a convenient way to resume work without re-entering the tags.
The interval to be resumed can be specified either by its id or by a set of tags.
Specifying multiple ids or both ids and tags will result in an error.
When given a set of tags, the first interval matching it will be taken as a blueprint for the new interval.
When given neither id nor tags, the first interval in the database is taken.
When no datetime or range given, the new interval is started at the current time.
== EXAMPLES
Using the 'summary' command and specifying the ':ids' hint shows interval IDs.
Consider the following intervals:
$ src/timew summary :ids
Wk Date Day ID Tags Start End Time Total
W23 2020-06-04 Thu @4 BAR 13:00:00 14:00:00 1:00:00
@3 BAR, FOO 14:00:00 15:00:00 1:00:00
@2 BAR, BAZ, FOO 15:00:00 16:00:00 1:00:00
@1 FOO 16:00:00 17:00:00 1:00:00 4:00:00
4:00:00
Simple continue::
+
$ timew continue
The 'continue' command creates a new open interval, starting now, with tag 'FOO'
Continue an interval via id::
+
$ timew continue @3
The 'continue' command creates a new open interval, starting now, with tags 'BAR' and 'FOO'.
Continue an interval via tag set::
+
$ timew continue FOO BAR
The 'continue' command creates a new open interval, starting now, with tags 'FOO', 'BAR', and 'BAZ'.
Note that the first matching interval (here '@2') is taken as a blueprint for the new interval, although '@3' would have been a perfect match for the given tag set.
The command 'timew continue BAR' would have the same effect.
This means that there is no way to continue '@4' via a tag set.
Continue an interval at a specific date & time::
+
$ timew continue @4 19:00 (1)
$ timew continue FOO 19:00 (2)
The 'continue' command creates a new open interval
1. with tag 'BAR' (as specified by '@4') and start time '19:00'.
2. with tag 'FOO' (as specified by '@1') and start time '19:00'.
Continue an interval with a specific range::
+
$ timew continue @4 19:00 - 20:00 (1)
$ timew continue FOO 19:00 - 20:00 (2)
The 'continue' command creates a new closed interval
1. with tag 'BAR' (as specified by '@4'), start time '19:00', and end time '20:00'.
2. with tag 'FOO' (as specified by '@1') and start time '19:00', and end time '20:00'.
== SEE ALSO
**timew-cancel**(1),
**timew-start**(1),
**timew-stop**(1),
**timew-track**(1)

View file

@ -1,38 +0,0 @@
.TH timew-continue 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-continue \- resume tracking of existing interval
.
.SH SYNOPSIS
.B timew continue
[
.I <id>
] [
{
.I <date>
|
.I <range>
}
]
.
.SH DESCRIPTION
Resumes tracking of closed intervals.
.
.SH EXAMPLES
For example:
.RS
$ timew track 9am - 10am tag1 tag2
.br
$ timew track 11am - 1pm tag3
.br
$ timew continue @2
.RE
The 'continue' command creates a new interval, starting now, and using the tags 'tag1' and 'tag2'.
Using the 'summary' command and specifying the ':ids' hint shows interval IDs.
This command is a convenient way to resume work without re-entering the tags.
.
.SH "SEE ALSO"
.BR timew-cancel (1),
.BR timew-start (1),
.BR timew-stop (1),
.BR timew-track (1)

1
doc/man1/timew-day.1 Normal file
View file

@ -0,0 +1 @@
.so man1/timew-chart.1

View file

@ -0,0 +1,26 @@
= timew-delete(1)
== NAME
timew-delete - delete intervals
== SYNOPSIS
[verse]
*timew delete* _<id>_**...**
== DESCRIPTION
Deletes an interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to delete.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to delete:
$ timew delete @2
== SEE ALSO
**timew-cancel**(1)

View file

@ -1,27 +0,0 @@
.TH timew-delete 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-delete \- delete intervals
.
.SH SYNOPSIS
.B timew delete
.I <id>
.B ...
.
.SH DESCRIPTION
Deletes an interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to delete.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
Then having selected '@2' as the interval you wish to delete:
.RS
$ timew delete @2
.RE
.
.SH "SEE ALSO"
.BR timew-cancel

View file

@ -1,14 +1,16 @@
.TH timew-diagnostics 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-diagnostics \- show diagnostic information
.
.SH SYNOPSIS
.B timew diagnostics
.
.SH DESCRIPTION
= timew-diagnostics(1)
== NAME
timew-diagnostics - show diagnostic information
== SYNOPSIS
[verse]
*timew diagnostics*
== DESCRIPTION
This command shows details about your version of Timewarrior, your platform, how it was built, compiler features, configuration, file access, extensions and more.
The purpose of this command is to help diagnose configuration problems and provide supplemental information when reporting a problem.
.
.SH "SEE ALSO"
.BR timew-extensions (1)
== SEE ALSO
**timew-extensions**(1)

View file

@ -0,0 +1,36 @@
= timew-export(1)
== NAME
timew-export - export tracked time in JSON
== SYNOPSIS
[verse]
*timew export* [ _<id>_**...** | ([_<range>_] [_<tag>_**...**]) ]
== DESCRIPTION
Exports all the tracked time in JSON format.
Supply either a list of interval IDs (e.g. `@1 @2`), or optional filters (see **timew-ranges**(7) and/or **timew-tags**(1))
== EXAMPLES
*Export all intervals*::
[source]
----
$ timew export
...
----
*Export intervals filtered by range and tag*::
[source]
----
$ timew export from 2016-01-01 for 3wks tag1
...
----
*Export intervals by their ids*::
[source]
----
$ timew export @1 @3 @7
...
----

View file

@ -1,22 +0,0 @@
.TH timew-export 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-export \- export tracked time in JSON
.
.SH SYNOPSIS
.B timew export
[
.I <range>
] [
.I <tag> ...
]
.
.SH DESCRIPTION
Exports all the tracked time in JSON format.
Supports filtering.
.
.SH EXAMPLES
For example:
.RS
$ timew export from 2016-01-01 for 3wks tag1
.RE

View file

@ -0,0 +1,14 @@
= timew-extensions(1)
== NAME
timew-extensions - list available extensions
== SYNOPSIS
[verse]
*timew extensions*
== DESCRIPTION
Displays the directory containing the extension programs and a table showing each extension and its status.
== SEE ALSO
**timew-diagnostics**(1)

View file

@ -1,13 +0,0 @@
.TH timew-extensions 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-extensions \- list available extensions
.
.SH SYNOPSIS
.B timew extensions
.
.SH DESCRIPTION
Displays the directory containing the extension programs and a table showing each extension and its status.
.
.SH "SEE ALSO"
.BR timew-diagnostics (1)

View file

@ -1,31 +1,30 @@
.TH timew-fill 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-fill \- adjust intervals to fill in surrounding gaps
.
.SH SYNOPSIS
.B timew fill
.I <id>
.B ...
.
.SH DESCRIPTION
= timew-fill(1)
== NAME
timew-fill - adjust intervals to fill in surrounding gaps
== SYNOPSIS
[verse]
*timew fill* _<id>_**...**
== DESCRIPTION
The 'fill' command is used to adjust any interval to fill in surrounding gaps.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to fill.
.
.SH EXAMPLES
== EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to fill:
.RS
$ timew fill @2
.RE
$ timew fill @2
Note that you can fill multiple intervals:
.RS
$ timew fill @2 @10 @23
.RE
.
.SH "SEE ALSO"
.BR timew-hints (1)
$ timew fill @2 @10 @23
== SEE ALSO
**timew-hints**(7)

View file

@ -0,0 +1,23 @@
= timew-gaps(1)
== NAME
timew-gaps - display time tracking gaps
== SYNOPSIS
[verse]
*timew gaps* [_<range>_] [_<tag>_**...**]
== DESCRIPTION
Displays a summary of time that is neither tracked nor excluded from tracking.
The 'reports.gaps.range' configuration setting overrides the default date range.
The ':blank' hint causes only the excluded time to be shown, with no tracked time.
The default date range shown is ':day'.
== CONFIGURATION
**reports.gaps.range**::
For reports that show a range of data, this setting will override the default value.
The value should be a range hint, see **timew-hints**(7).
== SEE ALSO
**timew-summary**(1)

View file

@ -1,34 +0,0 @@
.TH timew-gaps 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-gaps \- display time tracking gaps
.
.SH SYNOPSIS
.B timew gaps
[
.I <range>
] [
.I <tag>
.B ...
]
.
.SH DESCRIPTION
Displays a summary of time that is neither tracked nor excluded from tracking.
.
The 'reports.gaps.range' configuration setting overrides the default date range.
The ':blank' hint causes only the excluded time to be shown, with no tracked time.
The default date range shown is ':day'.
.
The ':blank' hint causes only the excluded time to be shown, with no tracked time.
.
.SH CONFIGURATION
.TP
.B reports.gaps.range
.RS
For reports that show a range of data, this setting will override the default value.
The value should be a range hint, see
.BR timew-hints (7).
.RE
.
.SH "SEE ALSO"
.BR timew-summary (1)

22
doc/man1/timew-get.1.adoc Normal file
View file

@ -0,0 +1,22 @@
= timew-get(1)
== NAME
timew-get - display DOM values
== SYNOPSIS
[verse]
*timew get* _<DOM>_**...**
== DESCRIPTION
Validates the DOM reference, then obtains the value and displays it.
== EXAMPLES
For example:
$ timew get dom.active
1
It is an error to reference an interval or tag that does not exist.
== SEE ALSO
**timew-dom**(7)

View file

@ -1,23 +0,0 @@
.TH timew-get 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-get \- display DOM values
.
.SH SYNOPSIS
.B timew get
.I <DOM>
.B ...
.
.SH DESCRIPTION
Validates the DOM reference, then obtains the value and displays it.
.
.SH EXAMPLES
For example:
.RS
$ timew get dom.active
1
.RE
It is an error to reference an interval or tag that does not exist.
.
.SH "SEE ALSO"
.BR timew-DOM

View file

@ -0,0 +1,22 @@
= timew-help(1)
== NAME
timew-help - display help
== SYNOPSIS
[verse]
*timew help* {_<command>_|*interval*|*hints*|*date*|*duration*}
== DESCRIPTION
The help command shows detailed descriptions and examples of commands, interval syntax, supported hints, date and duration formats and DOM references.
== EXAMPLES
For example:
$ timew help
$ timew help start
$ timew help hints
$ timew help interval
$ timew help date
$ timew help duration
$ timew help dom

View file

@ -1,39 +0,0 @@
.TH timew-help 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-help \- display help
.
.SH SYNOPSIS
.B timew help
{
.I <command>
|
.B interval
|
.B hints
|
.B date
|
.B duration
}
.
.SH DESCRIPTION
The help command shows detailed descriptions and examples of commands, interval syntax, supported hints, date and duration formats and DOM references.
.
.SH EXAMPLES
For example:
.RS
$ timew help
.br
$ timew help start
.br
$ timew help hints
.br
$ timew help interval
.br
$ timew help date
.br
$ timew help duration
.br
$ timew help dom
.RE

View file

@ -0,0 +1,28 @@
= timew-join(1)
== NAME
timew-join - join intervals
== SYNOPSIS
[verse]
*timew join* _<id> <id>_
== DESCRIPTION
Joins two intervals, by using the earlier one of the two start times, and the later one of the two end times, and the combined set of tags.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the correct IDs, you can identify an intervals to join.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@1' and '@2' as the intervals you wish to join:
$ timew join @1 @2
== SEE ALSO
**timew-lengthen**(1),
**timew-resize**(1),
**timew-shorten**(1),
**timew-split**(1)

View file

@ -1,29 +0,0 @@
.TH timew-join 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-join \- join intervals
.
.SH SYNOPSIS
.B timew join
.I <id> <id>
.
.SH DESCRIPTION
Joins two intervals, by using the earlier of the two start times, and the later of the two end times, and the combined set of tags.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the correct IDs, you can identify an intervals to join.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
Then having selected '@1' and '@2' as the intervals you wish to join:
.RS
$ timew join @1 @2
.RE
.
.SH "SEE ALSO"
.BR timew-lengthen (1),
.BR timew-resize (1),
.BR timew-shorten (1),
.BR timew-split (1)

View file

@ -0,0 +1,34 @@
= timew-lengthen(1)
== NAME
timew-lengthen - lengthen intervals
== SYNOPSIS
[verse]
*timew lengthen* _<id>_**...** _<duration>_
== DESCRIPTION
The 'lengthen' command is used to defer the end date of a closed interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to lengthen.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to lengthen:
$ timew lengthen @2 10mins
Note that you can lengthen multiple intervals,:
$ timew lengthen @2 @10 @23 1hour
== SEE ALSO
**timew-modify**(1),
**timew-resize**(1),
**timew-shorten**(1),
**timew-summary**(1),
**timew-tag**(1),
**timew-untag**(1)

View file

@ -1,37 +0,0 @@
.TH timew-lengthen 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-lengthen \- lengthen intervals
.
.SH SYNOPSIS
.B timew lengthen
.I <id>
.B ...
.I <duration>
.
.SH DESCRIPTION
The 'lengthen' command is used to defer the end date of a closed interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to lengthen.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
Then having selected '@2' as the interval you wish to lengthen:
.RS
$ timew lengthen @2 10mins
.RE
Note that you can lengthen multiple intervals,:
.RS
$ timew lengthen @2 @10 @23 1hour
.RE
.
.SH "SEE ALSO"
.BR timew-modify (1),
.BR timew-resize (1),
.BR timew-shorten (1),
.BR timew-summary (1),
.BR timew-tag (1),
.BR timew-untag (1)

View file

@ -0,0 +1,51 @@
= timew-modify(1)
== NAME
timew-modify - change the range of an interval
== SYNOPSIS
[verse]
*timew modify* (*start*|*end*) _<id>_ _<date>_
*timew modify* range _<id>_ _<range>_
== DESCRIPTION
The 'modify' command is used to change range of an interval.
Using the 'start' or 'end' subcommand, one can either specify a new start or end date respectively, or with the 'range' subcommand, change the complete range.
The interval to be modified is specified via its id.
If the resulting interval overlaps with an existing interval, the command will return an error.
One can add the ':adjust' hint to force an overwrite in this case.
See **timew-summary**(1) on how to retrieve the interval id.
== EXAMPLES
*Modify the start date of an interval*::
+
$ timew modify start @3 2020-12-28T17:00
+
This sets the start of interval '@3' to '17:00' of date '2020-12-28'.
If this datetime is after the end of the interval, the command will return an error.
*Modify the end date of an interval*::
+
If the interval to be modified has the same date as today, it can be omitted:
+
$ timew modify end @3 18:00
+
Similar to when modifying the interval start, the end datetime has to be after the start datetime.
*Modify the range of an interval*::
+
Instead of modifying start and end separately, those can be combined into a single call of the 'range' subcommand:
+
$ timew modify range @3 2020-12-28T17:00 - 2020-12-28T18:00
+
As in the examples above, the date portion can be omitted, if the date of the interval is today.
== SEE ALSO
**timew-lengthen**(1),
**timew-move**(1),
**timew-resize**(1),
**timew-shorten**(1),
**timew-summary**(1)

View file

@ -1,36 +0,0 @@
.TH timew-modify 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-modify \- change start or end date of an interval
.
.SH SYNOPSIS
.B timew modify (
.I start
|
.I end
)
.I <id>
.I <date>
.
.SH DESCRIPTION
The 'modify' command is used to change the start or end date of an interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to modify.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
.PP
Then having selected '@3' as the interval you wish to modify:
.RS
$ timew modify end @3 "${PACKAGE_DATE}"T17:00:00
.RE
.
.SH "SEE ALSO"
.BR timew-lengthen (1),
.BR timew-move (1),
.BR timew-resize (1)
.BR timew-shorten (1),
.BR timew-summary (1)

1
doc/man1/timew-month.1 Normal file
View file

@ -0,0 +1 @@
.so man1/timew-chart.1

View file

@ -0,0 +1,31 @@
= timew-move(1)
== NAME
timew-move - change interval start-time
== SYNOPSIS
[verse]
*timew move* _<id>_ _<date>_
== DESCRIPTION
The 'move' command is used to reposition an interval at a new start time.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to move.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to move:
$ timew move @2 9am
== SEE ALSO
**timew-lengthen**(1),
**timew-modify**(1),
**timew-resize**(1),
**timew-shorten**(1),
**timew-summary**(1),
**timew-tag**(1),
**timew-untag**(1)

View file

@ -1,32 +0,0 @@
.TH timew-move 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-move \- change interval start-time
.
.SH SYNOPSIS
.B timew move
.I <id> <date>
.
.SH DESCRIPTION
The 'move' command is used to reposition an interval at a new start time.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to move.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
Then having selected '@2' as the interval you wish to move:
.RS
$ timew move @2 9am
.RE
.
.SH "SEE ALSO"
.BR timew-lengthen (1),
.BR timew-modify (1),
.BR timew-resize (1),
.BR timew-shorten (1),
.BR timew-summary (1),
.BR timew-tag (1),
.BR timew-untag (1)

View file

@ -0,0 +1,36 @@
= timew-report(1)
== NAME
timew-report - run an extension report
== SYNOPSIS
[verse]
*timew* [*report*] _<report>_ [_<range>_] [_<tag>_**...**]
*timew* [*report*] _<report>_ _<id>_**...**
== DESCRIPTION
Runs an extension report, and supports filtering data.
The 'report' command itself is optional, which means that these two commands are equivalent:
$ timew report foo :week
$ timew foo :week
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.
Filtering is either possible by range and/or tags, or by ids.
== CONFIGURATION
**reports.range**::
Sets the default date range for all reports.
The value has to correspond to a range hint, see **timew-hints**(7).
Defaults to `all`
**reports.**__<name>__**.range**::
Set the date range for report _name_, used if no _range_ is given on the command line.
Here, _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 correspond to a range hint, see **timew-hints**(7).
Defaults to the value of **reports.range**.

View file

@ -1,27 +0,0 @@
.TH timew-report 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-report \- run an extension report
.
.SH SYNOPSIS
.B timew
[
.B report
]
.I <report>
[
.I <range>
] [
.I <tag>
.B ...
]
.
.SH DESCRIPTION
Runs an extension report, and supports filtering data.
The 'report' command itself is optional, which means that these two commands are equivalent:
.RS
$ timew report foo :week
.br
$ timew foo :week
.RE
This does however assume there is a 'foo' extension installed.

View file

@ -0,0 +1,34 @@
= timew-resize(1)
== NAME
timew-resize - set interval duration
== SYNOPSIS
[verse]
*timew resize* _<id>_**...** _<duration>_
== DESCRIPTION
The 'resize' command is used to change the duration of a closed interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to resize.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@3' as the interval you wish to resize:
$ timew resize @3 15mins
Note that you can resize multiple intervals,:
$ timew resize @3 @1 @13 1hour
== SEE ALSO
**timew-lengthen**(1),
**timew-modify**(1),
**timew-shorten**(1),
**timew-summary**(1),
**timew-tag**(1),
**timew-untag**(1)

View file

@ -1,37 +0,0 @@
.TH timew-resize 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-resize \- set interval duration
.
.SH SYNOPSIS
.B timew resize
.I <id>
.B ...
.I <duration>
.
.SH DESCRIPTION
The 'resize' command is used to change the duration of a closed interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to resize.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
Then having selected '@3' as the interval you wish to resize:
.RS
$ timew resize @3 15mins
.RE
Note that you can resize multiple intervals,:
.RS
$ timew resize @3 @1 @13 1hour
.RE
.
.SH "SEE ALSO"
.BR timew-lengthen (1),
.BR timew-modify (1),
.BR timew-shorten (1),
.BR timew-summary (1),
.BR timew-tag (1),
.BR timew-untag (1)

View file

@ -0,0 +1,40 @@
= timew-retag(1)
== NAME
timew-retag - replace all tags in intervals
== SYNOPSIS
[verse]
*timew retag* [_<id>_**...**] _<tag>_**...**
== DESCRIPTION
The 'retag' command is used to replace all tags in an interval with the newly provided tags.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to retag.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to retag:
$ timew retag @2 'New Tag'
Note that you can retag multiple intervals, with multiple tags:
$ timew retag @2 @10 @23 'Tag One' tag2 tag3
If there is active time tracking, you can omit the ID when you want to retag the current open interval:
$ timew start foo
$ timew retag bar
This results in the current interval having only the 'bar' tag.
== SEE ALSO
**timew-lengthen**(1),
**timew-shorten**(1),
**timew-summary**(1),
**timew-tag**(1),
**timew-untag**(1)

View file

@ -0,0 +1,34 @@
= timew-shorten(1)
== NAME
timew-shorten - shorten intervals
== SYNOPSIS
[verse]
*timew shorten* _<id>_**...** _<duration>_
== DESCRIPTION
The 'shorten' command is used to advance the end date of a closed interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to shorten.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to shorten:
$ timew shorten @2 10mins
Note that you can shorten multiple intervals,:
$ timew shorten @2 @10 @23 1hour
== SEE ALSO
**timew-lengthen**(1),
**timew-modify**(1),
**timew-resize**(1),
**timew-summary**(1),
**timew-tag**(1),
**timew-untag**(1)

View file

@ -1,38 +0,0 @@
.TH timew-shorten 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-shorten \- shorten intervals
.
.SH SYNOPSIS
.B timew shorten
.I <id>
.B ...
.I <duration>
.
.SH DESCRIPTION
The 'shorten' command is used to advance the end date of a closed interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to shorten.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
.br
Then having selected '@2' as the interval you wish to shorten:
.RS
$ timew shorten @2 10mins
.RE
Note that you can shorten multiple intervals,:
.RS
$ timew shorten @2 @10 @23 1hour
.RE
.
.SH "SEE ALSO"
.BR timew-lengthen (1),
.BR timew-modify (1),
.BR timew-resize (1),
.BR timew-summary (1),
.BR timew-tag (1),
.BR timew-untag (1)

View file

@ -0,0 +1,14 @@
= timew-show(1)
== NAME
timew-show - display configuration
== SYNOPSIS
[verse]
*timew show*
== DESCRIPTION
Displays the effective configuration in hierarchical form.
== SEE ALSO
**timew-config**(1)

View file

@ -1,13 +0,0 @@
.TH timew-show 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-show \- display configuration
.
.SH SYNOPSIS
.B timew show
.
.SH DESCRIPTION
Displays the effective configuration in hierarchical form.
.
.SH "SEE ALSO"
.BR timew-config (1)

View file

@ -0,0 +1,27 @@
= timew-split(1)
== NAME
timew-split - split intervals
== SYNOPSIS
[verse]
*timew split* _<id>_**...**
== DESCRIPTION
Ѕplits an interval into two equally sized adjacent intervals, having the same tags.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to split.
== EXAMPLES
For example, show the IDs:
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to split:
$ timew split @2
== SEE ALSO
**timew-join**(1),
**timew-lengthen**(1),
**timew-shorten**(1)

View file

@ -1,29 +0,0 @@
.TH timew-split 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-split \- split intervals
.
.SH SYNOPSIS
.B timew split
.I <id>
.B ...
.
.SH DESCRIPTION
Ѕplits an interval into two equally sized adjacent intervals, having the same tags.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to split.
.
.SH EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
Then having selected '@2' as the interval you wish to split:
.RS
$ timew split @2
.RE
.
.SH "SEE ALSO"
.BR timew-join (1),
.BR timew-lengthen (1),
.BR timew-shorten (1)

View file

@ -1,36 +1,31 @@
.TH timew-start 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-start \- start time tracking
.
.SH SYNOPSIS
.B timew start
[
.I <date>
] [
.I <tag>
.B ...
]
.
.SH DESCRIPTION
= timew-start(1)
== NAME
timew-start - start time tracking
== SYNOPSIS
[verse]
*timew start* [_<date>_] [_<tag>_**...**]
== DESCRIPTION
Begins tracking using the current time with any specified set of tags.
If a tag contains multiple words, therefore containing spaces, use quotes to surround the whole tag.
.
.SH EXAMPLES
== EXAMPLES
For example, this command specifies two tags ('weekend' and 'Home & Garden'), the second of which requires quotes.
.RS
$ timew start weekend 'Home & Garden'
.RE
$ timew start weekend 'Home & Garden'
An optional date may be specified to indicate the intended start of the tracked time:
.RS
$ timew start 8am weekend 'Home & Garden'
.RE
$ timew start 8am weekend 'Home & Garden'
If there is a previous open interval, it will be closed at the given start time.
.
Quotes are harmless if used unnecessarily.
.
.SH "SEE ALSO"
.BR timew-cancel (1),
.BR timew-continue (1),
.BR timew-stop (1),
.BR timew-track (1)
== SEE ALSO
**timew-cancel**(1),
**timew-continue**(1),
**timew-stop**(1),
**timew-track**(1)

View file

@ -0,0 +1,32 @@
= timew-stop(1)
== NAME
timew-stop - stop time tracking
== SYNOPSIS
[verse]
*timew stop* [_<date>_] [_<tag>_**...**]
== DESCRIPTION
Stops tracking time.
If tags are specified, then they are no longer tracked.
If no tags are specified, all tracking stops.
== EXAMPLES
For example:
$ timew start tag1 tag2
...
$ timew stop tag1
Initially time is tracked for both 'tag1' and 'tag2', then 'tag1' tracking is stopped, leaving tag2 active.
To stop all tracking:
$ timew stop
== SEE ALSO
**timew-cancel**(1),
**timew-continue**(1),
**timew-start**(1),
**timew-track**(1)

View file

@ -1,39 +0,0 @@
.TH timew-stop 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-stop \- stop time tracking
.
.SH SYNOPSIS
.B timew stop
[
.I <date>
] [
.I <tag>
.B ...
]
.
.SH DESCRIPTION
Stops tracking time.
If tags are specified, then they are no longer tracked.
If no tags are specified, all tracking stops.
.
.SH EXAMPLES
For example:
.RS
$ timew start tag1 tag2
.br
...
.br
$ timew stop tag1
.RE
Initially time is tracked for both 'tag1' and 'tag2', then 'tag1' tracking is stopped, leaving tag2 active.
To stop all tracking:
.RS
$ timew stop
.RE
.
.SH "SEE ALSO"
.BR timew-cancel (1),
.BR timew-continue (1),
.BR timew-start (1),
.BR timew-track (1)

View file

@ -0,0 +1,94 @@
= timew-summary(1)
== NAME
timew-summary - display a time-tracking summary
== SYNOPSIS
[verse]
*timew summary* [_<range>_] [_<tag>_**...**]
*timew summary* [_<id>_**...**]
== DESCRIPTION
Displays a table summarizing tracked time, by default for the current day.
Accepts date ranges (or range hints) and tags, or ids for filtering.
When ids are given, date ranges are ignored.
Specifying both, tags and ids, is an error.
== HINTS
Apart from range hints (see **timew-hints**(7)), the summary report adheres to the following hints:
**:annotations**::
**:no-annotations**::
Toggle the display of annotations in the summary report.
Can be used on the command line to override the configured setting.
The ':annotations' hint adds an 'Annotation' column to the summary table.
The annotation column is limited to 15 characters.
Longer values in this column are truncated to 12 characters and shown with an ellipsis attached.
**:holidays**::
**:no-holidays**::
Toggle the display of holidays in the summary report.
Can be used on the command line to override the configured setting.
**:ids**::
**:no-ids**::
Toggle the display of ids in the summary report.
Can be used on the command line to override the configured setting.
The ':ids' hint adds an 'ID' column to the summary table.
Those ids can be used for interval modification.
**:tags**::
**:no-tags**::
Toggle the display of tags in the summary report.
Can be used on the command line to override the configured setting.
The ':tags' hint adds a 'Tags' column to the summary table.
== CONFIGURATION
**reports.summary.annotations**::
Determines whether the annotation column is shown in the summary.
Can be overridden by the ':annotations' or ':no-annotations' hint, respectively.
Default value is 'no'
**reports.summary.holidays**::
Determines whether relevant holidays are shown beneath the report.
Can be overridden by the ':holidays' or ':no-holidays' hint, respectively.
Default value is 'yes'.
**reports.summary.ids**::
Determines whether the id column is shown in the summary.
Can be overridden by the ':ids' or ':no-ids' hint, respectively.
Default value is 'no'.
**reports.summary.tags**::
Determines whether the tags column is shown in the summary.
Can be overridden by the ':tags' or ':no-tags' hint, respectively.
Default value is 'yes'.
**reports.summary.range**::
Set the date range for the summary report.
The value has to correspond to a range hint, see **timew-hints**(7).
Default value is 'day'
**reports.summary.weekdays**::
Determines whether the weekday column is shown in the summary.
Default value is 'yes'
**reports.summary.weeks**::
Determines whether the week column is shown in the summary.
Default value is 'yes'
**tags.**__<tag>__**.color**::
Assigns a specific foreground and background color to a tag.
Examples of valid colors include 'white', 'gray8', 'black on yellow', and 'rgb345'.
== SEE ALSO
**timew-day**(1),
**timew-hints**(7),
**timew-lengthen**(1),
**timew-modify**(1),
**timew-month**(1),
**timew-shorten**(1),
**timew-tag**(1),
**timew-untag**(1),
**timew-week**(1)

View file

@ -1,44 +0,0 @@
.TH timew-summary 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-summary \- display a time-tracking summary
.
.SH SYNOPSIS
.B timew summary
[
.I <range>
] [
.I <tag>
.B ...
]
.
.SH DESCRIPTION
Displays a report summarizing tracked and untracked time for the current day by default.
Accepts date ranges and tags for filtering, or shortcut hints:
.RS
$ timew summary monday - today
.br
$ timew summary :week
.br
$ timew summary :month
.RE
The ':ids' hint adds an 'ID' column to the summary report output for interval modification.
.
.SH CONFIGURATION
.TP
.B reports.summary.holidays
.RS
Determines whether relevant holidays are shown beneath the report.
.br
Default value is 'yes'.
.RE
.
.SH "SEE ALSO"
.BR timew-day (1),
.BR timew-lengthen (1),
.BR timew-modify (1),
.BR timew-month (1),
.BR timew-shorten (1),
.BR timew-tag (1),
.BR timew-untag (1),
.BR timew-week (1)

View file

@ -1,45 +1,40 @@
.TH timew-tag 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-tag \- add tags to intervals
.
.SH SYNOPSIS
.B timew tag
[
.I <id>
.B ...
]
.I <tag>
.B ...
.
.SH DESCRIPTION
= timew-tag(1)
== NAME
timew-tag - add tags to intervals
== SYNOPSIS
[verse]
*timew tag* [_<id>_**...**] _<tag>_**...**
== DESCRIPTION
The 'tag' command is used to add a tag to an interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to tag.
.
.SH EXAMPLES
== EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to tag:
.RS
$ timew tag @2 'New Tag'
.RE
$ timew tag @2 'New Tag'
Note that you can tag multiple intervals, with multiple tags:
.RS
$ timew tag @2 @10 @23 'Tag One' tag2 tag3
.RE
$ timew tag @2 @10 @23 'Tag One' tag2 tag3
If there is active time tracking, you can omit the ID when you want to add tags to the current open interval:
.RS
$ timew start foo
.br
$ timew tag bar
.RE
$ timew start foo
$ timew tag bar
This results in the current interval having tags 'foo' and 'bar'.
.
.SH "SEE ALSO"
.BR timew-lengthen (1),
.BR timew-shorten (1),
.BR timew-summary (1),
.BR timew-untag (1)
== SEE ALSO
**timew-lengthen**(1),
**timew-retag**(1),
**timew-shorten**(1),
**timew-summary**(1),
**timew-untag**(1)

View file

@ -0,0 +1,18 @@
= timew-tags(1)
== NAME
timew-tags - display a list of tags
== SYNOPSIS
[verse]
*timew tags* [_<range>_]
== DESCRIPTION
Displays all the tags that have been used by default.
When a filter is specified, shows only the tags that were used during that time.
== CONFIGURATION
**tags.**__<tag>__**.color**::
Assigns a specific foreground and background color to a tag.
Examples of valid colors include 'white', 'gray8', 'black on yellow', and 'rgb345'.

View file

@ -1,14 +0,0 @@
.TH timew-tags 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-tags \- display a list of tags
.
.SH SYNOPSIS
.B timew tags
[
.I <range>
]
.
.SH DESCRIPTION
Displays all the tags that have been used by default.
When a filter is specified, shows only the tags that were used during that time.

View file

@ -0,0 +1,27 @@
= timew-track(1)
== NAME
timew-track - add intervals to the database
== SYNOPSIS
[verse]
*timew track* _<range>_ [_<tag>_**...**]
== DESCRIPTION
The track command is used to add tracked time in the past.
Perhaps you forgot to record time, or are just filling in old entries.
== EXAMPLES
For example:
$ timew track :yesterday 'Training Course'
$ timew track 9am - 11am 'Staff Meeting'
Note that the track command expects a closed interval (start and end time), when recording.
If a closed interval is not provided, the 'track' command behaves the same as the 'start' command.
== SEE ALSO
**timew-cancel**(1),
**timew-continue**(1),
**timew-start**(1),
**timew-stop**(1)

View file

@ -1,32 +0,0 @@
.TH timew-track 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-track \- add intervals to the database
.
.SH SYNOPSIS
.B timew track
.I <range>
[
.I <tag>
.B ...
]
.
.SH DESCRIPTION
The track command is used to add tracked time in the past.
Perhaps you forgot to record time, or are just filling in old entries.
.
.SH EXAMPLES
For example:
.RS
$ timew track :yesterday 'Training Course'
.br
$ timew track 9am - 11am 'Staff Meeting'
.RE
Note that the track command expects a closed interval (start and end time), when recording.
If a closed interval is not provided, the 'track' command behaves the same as the 'start' command.
.
.SH "SEE ALSO"
.BR timew-cancel (1),
.BR timew-continue (1),
.BR timew-start (1),
.BR timew-stop (1)

View file

@ -1,12 +1,13 @@
.TH timew-undo 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-undo \- revert Timewarrior commands
.
.SH SYNOPSIS
.B timew undo
.
.SH DESCRIPTION
= timew-undo(1)
== NAME
timew-undo - revert Timewarrior commands
== SYNOPSIS
[verse]
*timew undo*
== DESCRIPTION
The 'undo' command is used to revert the action of Timewarrior commands.
Only commands affecting intervals or Timewarrior configuration can be reverted.
Timewarrior keeps a journal of changes to the interval database and Timewarrior configuration.
@ -14,10 +15,8 @@ A call to 'undo' removes the last entry in the journal and restores the previous
As long as there are entries in the journal, you can revert the respective action.
The 'undo' command itself cannot be undone!
.SH EXAMPLES
Undo an interval modification:
.RS
$ timew split @1
.br
$ timew undo
.RE
== EXAMPLES
Undo an interval modification::
+
$ timew split @1
$ timew undo

View file

@ -1,45 +1,40 @@
.TH timew-untag 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-untag \- remove tags from intervals
.
.SH SYNOPSIS
.B timew untag
[
.I <id>
.B ...
]
.I <tag>
.B ...
.
.SH DESCRIPTION
= timew-untag(1)
== NAME
timew-untag - remove tags from intervals
== SYNOPSIS
[verse]
*timew untag* [_<id>_**...** ] _<tag>_**...**
== DESCRIPTION
The 'untag' command is used to remove a tag from an interval.
Using the 'summary' command, and specifying the ':ids' hint shows interval IDs.
Using the right ID, you can identify an interval to untag.
.
.SH EXAMPLES
== EXAMPLES
For example, show the IDs:
.RS
$ timew summary :week :ids
.RE
$ timew summary :week :ids
Then having selected '@2' as the interval you wish to untag:
.RS
$ timew untag @2 'Old Tag'
.RE
$ timew untag @2 'Old Tag'
Note that you can untag multiple intervals, with multiple tags:
.RS
$ timew untag @2 @10 @23 'Old Tag' tag2 tag3
.RE
$ timew untag @2 @10 @23 'Old Tag' tag2 tag3
If there is active time tracking, you can omit the ID when you want to remove tags from the current open interval:
.RS
$ timew start foo bar
.br
$ timew untag bar
.RE
$ timew start foo bar
$ timew untag bar
This results in the current interval having tag 'foo' but not 'bar'.
.
.SH "SEE ALSO"
.BR timew-lengthen (1),
.BR timew-shorten (1),
.BR timew-summary (1),
.BR timew-tag (1)
== SEE ALSO
**timew-lengthen**(1),
**timew-retag**(1),
**timew-shorten**(1),
**timew-summary**(1),
**timew-tag**(1)

1
doc/man1/timew-week.1 Normal file
View file

@ -0,0 +1 @@
.so man1/timew-chart.1

177
doc/man1/timew.1.adoc Normal file
View file

@ -0,0 +1,177 @@
= timew(1)
== NAME
timew - a command line time tracker
== SYNOPSIS
[verse]
*timew* [*--version*|*--help*]
*timew* [_<command>_ [_<arg>_**...**]]
== DESCRIPTION
Timewarrior is a command line time tracker.
It allows you to easily track your time and generate summary reports.
This is a reference, not a tutorial.
If you are looking for a tutorial, check the online documentation here:
[source]
----
https://timewarrior.net/docs/
----
When run without arguments or options, the default command is run, which indicates whether there is any active tracking, and if so, shows a summary and exits with code 0.
If there is no active time tracking, exit code is 1.
== OPTIONS
*--version*::
Display Timewarrior version information
*--help*::
Display Timewarrior usage information
== Timewarrior commands
Timewarrior supports many commands.
Alphabetically:
*timew-annotate*(1)::
Add annotation to intervals
*timew-cancel*(1)::
Cancel time tracking
*timew-config*(1)::
Get and set Timewarrior configuration
*timew-continue*(1)::
Resume tracking of existing interval
*timew-day*(1)::
Display day chart
*timew-delete*(1)::
Delete intervals
*timew-diagnostics*(1)::
Show diagnostic information
*timew-export*(1)::
Export tracked time in JSON
*timew-extensions*(1)::
List available extensions
*timew-get*(1)::
Display DOM values
*timew-help*(1)::
Display help
*timew-join*(1)::
Join intervals
*timew-lengthen*(1)::
Lengthen intervals
*timew-modify*(1)::
Change start or end time of an interval
*timew-month*(1)::
Display month chart
*timew-move*(1)::
Change interval start-time
*timew-report*(1)::
Run an extension report
*timew-resize*(1)::
Set interval duration
*timew-retag*(1)::
Replace tags in intervals
*timew-shorten*(1)::
Shorten intervals
*timew-show*(1)::
Display configuration
*timew-split*(1)::
Split intervals
*timew-start*(1)::
Start time tracking
*timew-stop*(1)::
Stop time tracking
*timew-summary*(1)::
Display a time-tracking summary
*timew-tag*(1)::
Add tags to intervals
*timew-tags*(1)::
Display a list of tags
*timew-track*(1)::
Add intervals to the database
*timew-undo*(1)::
Undo Timewarrior commands
*timew-untag*(1)::
Remove tags from intervals
*timew-week*(1)::
Display week chart
== MORE EXAMPLES
For examples please see the online documentation at:
https://timewarrior.net/docs/
Note that the online documentation is often more detailed and more current than this man page.
== FILES
=== Non-Unix systems
~/.timewarrior/timewarrior.cfg::
User configuration file.
~/.timewarrior/data/YYYY-MM.data::
Time tracking data files.
=== Unix systems
${XDG_CONFIG_HOME:-$HOME/.config}/timewarrior/timewarrior.cfg::
User configuration file if legacy _~/.timewarrior_ directory doesn't exist.
${XDG_DATA_HOME:-$HOME/.local/share}/timewarrior/data/YYYY-MM.data::
Time tracking data files if legacy _~/.timewarrior_ directory doesn't exist.
== pass:[CREDITS & COPYRIGHT]
Copyright (C) 2015 - 2018 T. Lauf, P. Beckingham, F. Hernandez. +
Timewarrior is distributed under the MIT license.
See https://www.opensource.org/licenses/mit-license.php for more information.
== FURTHER DOCUMENTATION
For more information regarding Timewarrior, see the following:
The official site at https://timewarrior.net
The official code repository at https://github.com/GothenburgBitFactory/timewarrior
You can contact the project by emailing support@gothenburgbitfactory.org
== REPORTING BUGS
Bugs in Timewarrior may be reported to the issue-tracker at https://github.com/GothenburgBitFactory/timewarrior/issues
== SEE ALSO
**timew-config**(7),
**timew-dates**(7),
**timew-dom**(7),
**timew-durations**(7),
**timew-hints**(7),
**timew-ranges**(7)

View file

@ -1,239 +0,0 @@
.TH timew 1 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew \- A command line time tracker.
.
.SH SYNOPSIS
.BR "timew " [ --version | --help ]
.br
.B timew
.RI [ "<command> " [ <arg> "...]]"
.
.SH DESCRIPTION
Timewarrior is a command line time tracker.
It allows you to easily track your time and generate summary reports.
.
This is a reference, not a tutorial.
If you are looking for a tutorial, check the online documentation here:
.br
https://taskwarrior.org/docs/timewarrior
.br
When run without arguments or options, the default command is run, which indicates whether there is any active tracking, and if so, shows a summary, then exits with a code 0.
If there is no active time tracking, exit code is 1.
.
.SH OPTIONS
.TP
.B \-\-version
.RS
Displays TimeWarrior version information
.RE
.TP
.B \-\-help
.RS
Display TimeWarrior usage information
.RE
.
.SH "TIMEWARRIOR COMMANDS"
Timewarrior supports many commands.
Alphabetically:
.
.TP
.BR timew-annotate (1)
.RS
Add annotation to intervals
.RE
.TP
.BR timew-cancel (1)
.RS
Cancel time tracking
.RE
.TP
.BR timew-config (1)
.RS
Get and set Timewarrior configuration
.RE
.TP
.BR timew-continue (1)
.RS
Resume tracking of existing interval
.RE
.TP
.BR timew-day (1)
.RS
Display day chart
.RE
.TP
.BR timew-delete (1)
.RS
Delete intervals
.RE
.TP
.BR timew-diagnostics (1)
.RS
Show diagnostic information
.RE
.TP
.BR timew-export (1)
.RS
Export tracked time in JSON
.RE
.TP
.BR timew-extensions (1)
.RS
List available extensions
.RE
.TP
.BR timew-get (1)
.RS
Display DOM values
.RE
.TP
.BR timew-help (1)
.RS
Display help
.RE
.TP
.BR timew-join (1)
.RS
Join intervals
.RE
.TP
.BR timew-lengthen (1)
.RS
Lengthen intervals
.RE
.TP
.BR timew-modify (1)
.RS
Change start or end time of an interval
.RE
.TP
.BR timew-month (1)
.RS
Display month chart
.RE
.TP
.BR timew-move (1)
.RS
Change interval start-time
.RE
.TP
.BR timew-report (1)
.RS
Run an extension report
.RE
.TP
.BR timew-resize (1)
.RS
Set interval duration
.RE
.TP
.BR timew-shorten (1)
.RS
Shorten intervals
.RE
.TP
.BR timew-show (1)
.RS
Display configuration
.RE
.TP
.BR timew-split (1)
.RS
Split intervals
.RE
.TP
.BR timew-start (1)
.RS
Start time tracking
.RE
.TP
.BR timew-stop (1)
.RS
Stop time tracking
.RE
.TP
.BR timew-summary (1)
.RS
Display a time-tracking summary
.RE
.TP
.BR timew-tag (1)
.RS
Add tags to intervals
.RE
.TP
.BR timew-tags (1)
.RS
Display a list of tags
.RE
.TP
.BR timew-track (1)
.RS
Add intervals to the database
.RE
.TP
.BR timew-undo (1)
.RS
Undo Timewarrior commands
.RE
.TP
.BR timew-untag (1)
.RS
Remove tags from intervals
.RE
.TP
.BR timew-week (1)
.RS
Display week chart
.RE
.
.SH "MORE EXAMPLES"
.
For examples please see the online documentation starting at:
.
.RS
<https://taskwarrior.org/docs/timewarrior/>
.RE
.
Note that the online documentation can be more detailed and more current than this man page.
.
.SH FILES
.
.TP
~/.timewarrior/timewarrior.cfg
User configuration file.
.
.TP
~/.timewarrior/data/YYYY-MM.data
Time tracking data files.
.
.SH "CREDITS & COPYRIGHTS"
Copyright (C) 2015 \- 2018 T. Lauf, P. Beckingham, F. Hernandez.
.br
Timewarrior is distributed under the MIT license.
See https://www.opensource.org/licenses/mit-license.php for more information.
.
.SH "FURTHER DOCUMENTATION"
For more information regarding Timewarrior, see the following:
.
.TP
The official site at <https://timewarrior.net>
.
.TP
The official code repository at <https://github.com/GothenburgBitFactory/timewarrior>
.
.TP
You can contact the project by emailing <support@gothenburgbitfactory.org>
.
.SH "REPORTING BUGS"
.TP
Bugs in Timewarrior may be reported to the issue-tracker at <https://github.com/GothenburgBitFactory/timewarrior/issues>
.
.SH "SEE ALSO"
.BR timew-config (7),
.BR timew-dates (7),
.BR timew-dom (7),
.BR timew-durations (7),
.BR timew-hints (7),
.BR timew-ranges (7)

24
doc/man7/CMakeLists.txt Normal file
View file

@ -0,0 +1,24 @@
cmake_minimum_required (VERSION 3.10)
if (ASCIIDOCTOR_FOUND)
file (GLOB DOC_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.7.adoc")
set (DOC_FILES)
foreach (SRC IN LISTS DOC_SOURCES)
string (REPLACE ".adoc" "" OUTPUT_FILE_NAME "${SRC}")
string (REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" OUTPUT_FILE_NAME "${OUTPUT_FILE_NAME}")
add_custom_command (OUTPUT "${OUTPUT_FILE_NAME}"
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage ${ASCIIDOCTOR_OPTIONS} "${SRC}" -o "${OUTPUT_FILE_NAME}"
DEPENDS "${SRC}")
list (APPEND DOC_FILES "${OUTPUT_FILE_NAME}")
endforeach (SRC)
add_custom_target (man7 DEPENDS ${DOC_FILES})
else (ASCIIDOCTOR_FOUND)
file (GLOB MAN_PAGES "${CMAKE_CURRENT_SOURCE_DIR}/*.7")
set (DOC_FILES ${MAN_PAGES})
endif (ASCIIDOCTOR_FOUND)
install (FILES ${DOC_FILES} DESTINATION ${TIMEW_MAN7DIR})

View file

@ -0,0 +1,72 @@
= timew-config(7)
== NAME
timew-config - Timewarrior configuration file and override options
== SYNOPSIS
**timew rc.**__<name>__**=**__<value>__ _<command>_
== DESCRIPTION
Timewarrior stores its configuration in the user's home directory in _~/.timewarrior/timewarrior.cfg_ on non-Unix systems (e.g. Windows).
On Unix systems, XDG Base Directory specification is supported, if _~/.timewarrior_ directory doesn't exist
(old config directory is still supported and has precedence over XDG BD compliant locations).
This means configuration is stored in _$XDG_CONFIG_HOME/timewarrior/timewarrior.cfg_, which defaults to _~/.config/timewarrior/timewarrior.cfg_ if _$XDG_CONFIG_HOME_ environment variable is not specified.
Those wanting to migrate their data to a new directory scheme, might do that with following shell snippet:
[source,shell]
----
LEGACY="${HOME}/.timewarrior"
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/timewarrior"
DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/timewarrior"
mkdir -p "${CONFIG_DIR}"
mkdir -p "${DATA_DIR}"
mv "${LEGACY}/timewarrior.cfg" "${CONFIG_DIR}"
mv "${LEGACY}/extensions" "${CONFIG_DIR}"
mv "${LEGACY}/data" "${DATA_DIR}"
rmdir "${LEGACY}"
----
This file contains a mix of rules and configuration settings.
Note that the TIMEWARRIORDB environment variable can be set to override this location.
The values 'true', '1', 'y', 'yes' and 'on' are all equivalent and enable a setting.
Any other value means disable the setting.
Default values may be overridden by timewarrior.cfg values, which may in turn be overridden on the command line using: **rc.**__<name>__**=**__<value>__
For example, to turn off verbose mode:
rc.verbose=0
Note that hints can also do this (:quiet).
== CONFIGURATION
*confirmation*::
Determines whether harmful operations require interactive confirmation.
+
May be overridden by the ':yes' hint.
+
Default value is 'yes'.
*verbose*::
Determines whether Timewarrior generates feedback.
+
May be overridden by the ':quiet' hint.
+
Default value is 'yes'.
*debug*::
Determines whether diagnostic debugging information is shown.
+
Useful for troubleshooting, but not for general use.
+
Default value is 'off'.
*debug.indicator*::
The debug output prefix string.
+
Default value is '>>'.

View file

@ -1,62 +0,0 @@
.TH timew-config 7 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-config \- Timewarrior configuration file and override options
.
.SH SYNOPSIS
.BI "timew rc." <name> = "<value> <command>"
.
.SH DESCRIPTION
Timewarrior stores its configuration in the user's home directory in
.I ~/.timewarrior/timewarrior.cfg.
This file contains a mix of rules and configuration settings.
Note that the TIMEWARRIORDB environment variable can be set to override this location.
.
The values 'true', '1', 'y', 'yes' and 'on' are all equivalent and enable a setting.
Any other value means disable the setting.
.
Default values may be overridden by timewarrior.cfg values, which may in turn be overridden on the command line using:
.BI rc. <name> = <value>
.PP
For example, to turn off verbose mode:
.RS
rc.verbose=0
.RE
.PP
Note that hints can also do this (:quiet).
.
.SH CONFIGURATION
.TP
.B confirmation
.RS
Determines whether harmful operations require interactive confirmation.
.br
May be overridden by the ':yes' hint.
.br
Default value is 'yes'.
.RE
.TP
.B verbose
.RS
Determines whether Timewarrior generates feedback.
.br
May be overridden by the ':quiet' hint.
.br
Default value is 'yes'.
.RE
.TP
.B debug
.RS
Determines whether diagnostic debugging information is shown.
.br
Useful for troubleshooting, but not for general use.
.br
Default value is 'off'.
.RE
.TP
.B debug.indicator
.RS
The debug output prefix string.
.br
Default value is '>>'.
.RE

View file

@ -1,39 +1,46 @@
.TH timew-dates 7 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-dates \- date formats supported by Timewarrior
.
.SH SYNOPSIS
.
.SH DESCRIPTION
Timewarrior supports the following date formats based on ISO-8601:
.
= timew-dates(7)
== NAME
timew-dates - date formats supported by Timewarrior
== SYNOPSIS
== DESCRIPTION
Timewarrior supports the following datetime formats based on ISO-8601.
If times are followed by a 'Z', they are assumed to be in UTC, otherwise local time (TZ) is assumed.
<extended-date> [T <extended-time>] Extended date, optional extended time
<date> [T <time>] Date, optional time
<extended-time> Extended time
<time> Time
.
extended-date:
extended-date::
+
YYYY-MM-DD Year, month, day
YYYY-MM Year, month, 1st
YYYY-DDD Year, Julian day 001-366
YYYY-WwwD Year, week number, day number
YYYY-Www Year, week number, day 1
.
extended-time:
extended-time::
+
hh:mm[:ss]Z Hours, minutes, optional seconds, UTC
hh:mm[:ss][+/-hh:mm] Hours, minutes, optional seconds, TZ
.
date:
date::
+
YYYYMMDD Year, month, day
YYYYWww Year, week number, day number
YYYYDDD Year, Julian day 001-366
.
time:
time::
+
hhmm[ss]Z Hour, minutes, optional seconds, UTC
hhmm[ss][+/-hh[mm]] Hour, minutes, optional seconds, TZ
.br
Examples:
== EXAMPLES
Here are some examples for ISO datetimes:
2016-06-09T08:12:00Z
2016-06T08:12:00+01:00
2016-06T08:12Z
@ -44,9 +51,9 @@ Examples:
2016W24
8:12:00Z
0812-0500
.br
In addition to the standard date formats, the following are supported:
.
In addition to the standard date formats, the following named dates are supported:
now Current date and time
today Current date at 0:00:00
yesterday Yesterday at 0:00:00
@ -55,7 +62,7 @@ In addition to the standard date formats, the following are supported:
<month-of-year> Previous 1st of the month at 0:00:00
hh:mm[:ss][am|a|pm|p] Short time format
Nst, Nnd, Nrd, Nth Previous 1st, 2nd, 3rd ...
<epoch> POSIX time
<epoch> POSIX time (at least 315532800)
later 2038-01-18T0:00:00 (Y2K38)
someday 2038-01-18T0:00:00 (Y2K38)
sopd, eopd Start/end of previous day
@ -84,14 +91,31 @@ In addition to the standard date formats, the following are supported:
midsommar midnight, 1st Saturday after 20th June
midsommarafton midnight, 1st Friday after 19th June
juhannus midnight, 1st Friday after 19th June
.br
Examples:
For times, the following are also possible:
8am
24th
monday
august
.br
.
.SH "SEE ALSO"
.BR timew-durations (7),
.BR timew-hints (7)
== NOTES
The minimum value for the POSIX time format of 315532800 (that is 1980-01-01) was chosen to avoid confusion with ISO dates in the YYYYMMDD format.
Because named dates are defined with time 0:00:00, using them as range end excludes the respective day.
E.g. using 'today' as upper range
[source]
----
$ timew sum 2d before today
----
will not show any intervals of the current day.
Use either 'now' or 'tomorrow' in this case:
[source]
----
$ timew sum 2d before now
$ timew sum 2d before tomorrow
----
== SEE ALSO
**timew-durations**(7),
**timew-hints**(7)

View file

@ -1,23 +1,23 @@
.TH timew-dom 7 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-dom \- Timewarrior DOM
.
.SH SYNOPSIS
.
.SH DESCRIPTION
= timew-dom(7)
== NAME
timew-dom - Timewarrior DOM
== SYNOPSIS
== DESCRIPTION
Supported DOM references are:
.
dom.tag.count Count of all tags
dom.tag.1 Nth tag used
.
dom.active '1' if there is active tracking, otherwise '0'
dom.active.tag.count Count of active tags
dom.active.tag.1 Active Nth tag
dom.active.start Active start timestamp (ISO Extended local date)
dom.active.duration Active elapsed (ISO Period)
dom.active.json Active interval as JSON
.
dom.tracked.count Count of tracked intervals
dom.tracked.1.tag.count Count of active tags
dom.tracked.1.tag.1 Tracked Nth, Nth tag
@ -25,5 +25,5 @@ Supported DOM references are:
dom.tracked.1.end Tracked Nth, end time, blank if closed
dom.tracked.1.duration Tracked Nth, elapsed
dom.tracked.1.json Tracked Nth, interval as JSON
.
dom.rc.<name> Configuration setting

View file

@ -1,17 +1,18 @@
.TH timew-durations 7 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-durations \- duration formats supported by Timewarrior
.
.SH SYNOPSIS
.
.SH DESCRIPTION
= timew-durations(7)
== NAME
timew-durations - duration formats supported by Timewarrior
== SYNOPSIS
== DESCRIPTION
Timewarrior supports the following duration formats based on ISO-8601:
.
'P' [nn 'Y'] [nn 'M'] [nn 'D'] ['T' [nn 'H'] [nn 'M'] [nn 'S']]
PnnW
.br
Examples:
P1Y 1 year
P1.5M 1.5 months
PT1S 1 second
@ -20,16 +21,16 @@ Examples:
P600D 600 days
P3W 3 weeks
P1Y1DT1H1M1S 1 year and 25 hours, 61 seconds (imprecise term)
.br
Note that the year and month terms are imprecise, being defined as 365d and 30d respectively.
For precision use the other terms.
.br
In addition to the standard duration formats, the following are supported:
.
n[.n]<unit>
.br
Where the <unit> is one of:
.
annual
biannual
bimonthly
@ -48,12 +49,12 @@ Where the <unit> is one of:
weekdays
weekly, weeks, week, wks, wk, w
yearly, years, year, yrs, yr, y
.br
Examples:
1hour 60 minutes
1.5h 90 minutes
3mo 3 months
10d 10 days
.br
Note that the year, quarter and month terms are imprecise, being defined as 365d, 91d and 30d respectively.
For precision use the other terms.

View file

@ -1,41 +1,42 @@
.TH timew-hints 7 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-hints \- Timewarrior hints
.
.SH SYNOPSIS
.
.SH DESCRIPTION
= timew-hints(7)
== NAME
timew-hints - Timewarrior hints
== SYNOPSIS
== DESCRIPTION
Timewarrior supports hints, which are single-word command line features that start with a colon like this:
.
:week
.br
Hints serve several purposes.
This example is a shortcut for the date range that defines the current week.
.br
Other hints, such as:
.
:quiet
.br
Are ways to control the behavior of Timewarrior, in this case eliminating all forms of feedback, for purposes of automation.
.br
are ways to control the behavior of Timewarrior, in this case eliminating all forms of feedback, for purposes of automation.
The supported hints are:
.
:quiet Turns off all feedback. For automation
:debug Runs in debug mode, shows many runtime details
:yes Overrides confirmation by answering 'yes' to the questions
.
:color Force color on, even if not connected to a TTY
:nocolor Force color off, even if connected to a TTY
:blank Leaves tracked time out of a report
:fill Expand time to fill surrounding available gap
:adjust Automatically correct overlaps
:ids Displays interval ID numbers in the summary report
.br
Range hints provide convenient shortcuts to date ranges:
.
:all All tracked time
:yesterday The 24 hours of the previous day
:day The 24 hours of the current day
:day / :today The 24 hours of the current day
:week This week
:fortnight This week and the one before
:month This month

View file

@ -1,23 +1,23 @@
.TH timew-ranges 7 "${PACKAGE_DATE}" "${PACKAGE_STRING}" "User Manuals"
.
.SH NAME
timew-ranges \- date and time ranges supported by Timewarrior
.
.SH SYNOPSIS
.
.SH DESCRIPTION
= timew-ranges(7)
== NAME
timew-ranges - date and time ranges supported by Timewarrior
== SYNOPSIS
== DESCRIPTION
An interval defines a block of time that is tracked.
The syntax for specifying an interval is flexible, and may be one of:
.
[from] <date>
[from] <date> to/- <date>
[from] <date> for <duration>
<duration> before/after <date>
<duration> ago
[for] <duration>
.br
Examples are:
.
from 9:00
from 9am - 11am
from 9:00:00 to 11:00
@ -26,5 +26,10 @@ Examples are:
2h before 11:00
2h ago
for 2h
.br
An interval is said to be 'closed' if there is both a start and end, and 'open' if there is no end date.
An interval is called 'closed' if there is both a start date and an end date, and 'open' if there is no end date.
There is also a number of useful hints for common ranges.
== SEE ALSO
**timew-hints**(7)

View file

@ -1,26 +1,26 @@
Rules System
============
The Timewarrior rule system reads your ~/.timewarrior/timewarrior.cfg file and
uses the combination of configuration settings and logic within to:
The Timewarrior rule system reads your timewarrior.cfg file and uses the combination of configuration settings and logic within to:
- Define configuration and customization details
- Define tags, exclusions, constraints
- Define various policies
The rules are a mechanism to apply late-bound logic and data to various
functions. Whenever data changes, the rule system is run, which will run each
rule in turn, if it applies, going from top to bottom in the rules file. There
are no chained rules, but errors will be able to terminate rule processing and
program execution.
On non-Unix systems config file is expected in ~/.timewarrior directory.
On Unix systems, if legacy ~/.timewarrior directory doesn't exist, config is read from $XDG_CONFIG_HOME/timewarrior directory (if not specified, $XDG_CONFIG_HOME defaults to ~/.config).
As much functionality as possible is to be deferred to the rules system, which
will initially be minimal, but grow to be come more capable.
The rules are a mechanism to apply late-bound logic and data to various functions.
Whenever data changes, the rule system is run, which will run each
rule in turn, if it applies, going from top to bottom in the rules file.
There are no chained rules, but errors will be able to terminate rule processing and program execution.
As much functionality as possible is to be deferred to the rules system, which will initially be minimal, but grow to become more capable.
Format
------
The rules are written as UTF8 text in the ~/.timewarrior/timewarrior.cfg text
file. Other rules files may be included:
The rules are written as UTF8 text in the timewarrior.cfg text file.
Other rules files may be included:
import /path/to/other/rule/file
@ -29,8 +29,7 @@ The syntax of rules is Python-like, in that indentation is significant.
Types of Rules
--------------
There are several different types of rules, for example there is the rule that
defines all exclusions:
There are several different types of rules, for example there is the rule that defines all exclusions:
define exclusions:
...
@ -55,8 +54,7 @@ There are rules that will serve as hooks:
Rule Type: Exclusions
---------------------
Because exclusions are resolved at run time, and only when needed, they should
be stored in a readily-interpreted form:
Because exclusions are resolved at run time, and only when needed, they should be stored in a readily-interpreted form:
define exclusions:
monday = <8:00:00 12:00:00-12:45:00 >17:30:00
@ -69,17 +67,15 @@ be stored in a readily-interpreted form:
2016_01_01 = Working
2016_01_02 = Off
If you want to track your lunch breaks, then you would make a tag for it, and
track it like any other project. If you do not want to track that time, add an
exclusion for it.
If you want to track your lunch breaks, then you would make a tag for it, and track it like any other project.
If you do not want to track that time, add an exclusion for it.
Rule Type: General
------------------
There are rules triggered by changes to the data. In this example, rule 'one'
is a constraint that prevents the value 'foo' from exceeding three. It is
triggered by a change to 'foo', which is a DOM reference, and can prevent the
update by failing:
There are rules triggered by changes to the data.
In this example, rule 'one' is a constraint that prevents the value 'foo' from exceeding three.
It is triggered by a change to 'foo', which is a DOM reference, and can prevent the update by failing:
define rules:
one:
@ -92,8 +88,7 @@ Note that this rule is defined as applying to the tagset 'tag1'.
Rule Type: Tag
--------------
A defined tag is a way to associate metadata with a tag, such as a description
and start/end dates for use:
A defined tag is a way to associate metadata with a tag, such as a description and start/end dates for use:
define tags:
"tag1":
@ -107,8 +102,7 @@ and start/end dates for use:
Rule Type: Theme
----------------
A color theme is defined by a rule, and consists of color definitions for
various report and feedback elements:
A color theme is defined by a rule, and consists of color definitions for various report and feedback elements:
define theme:
description = "A monochrome, 256-color theme"
@ -120,20 +114,16 @@ various report and feedback elements:
color2 = "white on blue"
...
The palette group is a list (more is better) of themed colors for use when auto-
coloring tags.
The palette group is a list (more is better) of themed colors for use when auto-coloring tags.
There is only one theme namespace, so if multiple themes are imported, the last
one can override all the prior theme settings. This means themes can be layered,
but they would need to be designed for this.
There is only one theme namespace, so if multiple themes are imported, the last one can override all the prior theme settings.
This means themes can be layered, but they would need to be designed for this.
Rule Type: Hook
---------------
While there may not be hooks in the traditional sense, with fixed arguments,
there will be rules that have the same role. Hook rules will allow an internal
event to trigger a rule that calls an external script, and passes an arbitrary
set of arguments.
While there may not be hooks in the traditional sense, with fixed arguments, there will be rules that have the same role.
Hook rules will allow an internal event to trigger a rule that calls an external script, and passes an arbitrary set of arguments.
[Mechanism TBD]
@ -149,8 +139,7 @@ set of arguments.
on_modify:
...
These rules can run an external script and provide arguments, based on rules
DOM access:
These rules can run an external script and provide arguments, based on rules DOM access:
define rules:
on_modify:
@ -159,8 +148,7 @@ DOM access:
Rules Type: Hint
----------------
Hints may be defined using the rules system, to augment the built-in hints that
are used by almost every command.
Hints may be defined using the rules system, to augment the built-in hints that are used by almost every command.
define hints:
staff:
@ -172,8 +160,7 @@ are used by almost every command.
--- Raw Notes ---
- Need to distinguish between regular time and over time, with different rates
and limits.
- Need to distinguish between regular time and over time, with different rates and limits.
- Policy support involves things like:
- warn after 40 hrs/wk
@ -181,8 +168,7 @@ are used by almost every command.
- auto-tag intervals that exceed 40 hrs/wk
- auto-tag intervals during exclusion time
- Need to distinguish between rules that will be supported at 1.0.0, and the
long term enhancements.
- Need to distinguish between rules that will be supported at 1.0.0, and the long term enhancements.
- There will need to be several built-in functions, for use by rules:
@ -193,12 +179,10 @@ are used by almost every command.
These are not good examples.
- Need reports to help users doing fixed-rate work - finding the longest task
for example.
- Need reports to help users doing fixed-rate work - finding the longest task for example.
- If an interval has more than one tag with a defined color, and is being
rendered, then use the first tag color. It doesn't really matter which.
- Use display granularity/resolution to see more or less details. This would
combine nicely with a tag hierarchy. (Tomas Babej)
- If an interval has more than one tag with a defined color, and is being rendered, then use the first tag color.
It doesn't really matter which.
- Use display granularity/resolution to see more or less details.
This would combine nicely with a tag hierarchy. (Tomas Babej)

View file

@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 3.10)
message ("-- Configuring theme documentation")
install (FILES README DESTINATION ${TIMEW_DOCDIR}/doc/themes)
INSTALL (FILES dark.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
INSTALL (FILES dark_blue.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
INSTALL (FILES dark_green.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
INSTALL (FILES dark_red.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
install (FILES README DESTINATION ${TIMEW_DOCDIR}/themes)
install (FILES dark.theme DESTINATION ${TIMEW_DOCDIR}/themes)
install (FILES dark_blue.theme DESTINATION ${TIMEW_DOCDIR}/themes)
install (FILES dark_green.theme DESTINATION ${TIMEW_DOCDIR}/themes)
install (FILES dark_red.theme DESTINATION ${TIMEW_DOCDIR}/themes)

5
doc/themes/README vendored
View file

@ -4,7 +4,8 @@ The theme files define colors that Timewarrior uses in various situations.
There are several themes provided with Timewarrior, and you use a theme by importing it into your configuration file.
Edit this file:
~/.timewarrior/timewarrior.cfg
~/.timewarrior/timewarrior.cfg (non-Unix systems or instalations using pre-XDG paths on Unix systems)
${XDG_CONFIG_HOME:-$HOME/.config}/timewarrior/timewarrior.cfg (Unix systems)
And add the import line, which looks like this:
@ -35,7 +36,7 @@ Color settings include:
The color palette is used to automatically color tagged time in reports.
When creating a color theme, the palette should be larger rather than smaller.
It is recommended that you provide at least 16 colors, otherwise Timewarrior cycles through them and you'll see repetitions.
It is recommended that you provide at least 16 colors, otherwise Timewarrior cycles through them, and you'll see repetitions.
## Share Your Theme

Some files were not shown because too many files have changed in this diff Show more