Commit graph

1687 commits

Author SHA1 Message Date
Thomas Lauf
b00d097e3e Extract function to calculate indent 2019-01-21 14:18:16 +01:00
Thomas Lauf
f5bbe5e1bc Let command join merge tags of given intervals 2019-01-20 23:25:54 +01:00
Thomas Lauf
2026296bf5 Update AUTHORS, ChangeLog
- Fix copyright dates
2018-12-06 21:08:30 +01:00
Thomas Lauf
9598f01fcf Remove accidentially added files from repository 2018-12-06 13:36:17 +01:00
Shaun Ruffell
ceca4c817e #131: Introduce 'modify' to adjust historical records to fixed date/time.
This change introduces a new command that, like lengthen, move, resize, and
shorten, is intended to move and/or resize a record, but instead of taking an
interval, will take an absolute date/time.

This command is useful because it removes the need for the user to calculate
the time intervals to shorten / lengthen a record by. For example, if the user
accidentally forgot to stop tracking an interval before starting a new one,
but new they stopped working at a specific time, it is easy to simply modify
the end time of the interval that they had forgotten to stop.
2018-11-30 22:27:08 +01:00
Shaun Ruffell
0a766bb86f Make Range destructor virtual.
This quiets the following compiler warning:

   warning: destructor called on non-final 'Interval' that has virtual functions but non-virtual destructor
2018-11-30 22:27:08 +01:00
Thomas Lauf
c598f2bd66 Add lower bounds check for DOM tag reference
- Closes #189
2018-11-25 12:24:30 +01:00
Thomas Lauf
067a475614 libshared: Updated to 230c63bd385b2a5a6ee5eb431df54b0c5c229b4d
- Closes #139
2018-11-04 19:25:03 +01:00
Thomas Lauf
72cfe7b4d8 Allow for closed intervals with start date in the future
- open intervals still have to start before now (move check to CmdStart)
- Closes #62
- Closes #142
2018-10-19 14:07:19 +02:00
Thomas Lauf
72acde371e Quote annotation in serialization to prevent splitting by lexer
Closes #183
2018-10-15 16:02:05 +02:00
Thomas Lauf
3678c2cdc3 Add hint :annotations to display annotation column in summary (default: hidden) 2018-10-10 22:10:01 +02:00
Thomas Lauf
a35b9d6660 Add annotation column to summary 2018-10-10 21:38:57 +02:00
Thomas Lauf
fc1761e700 Fix behaviour when 'timew annotate' is called without annotation string 2018-10-10 20:42:01 +02:00
Thomas Lauf
63bb079f5e Update CmdHelp with help about 'timew annotate' 2018-10-10 15:50:11 +02:00
Thomas Lauf
58e7cec118 Added first version of command 'annotate'
Closes #68
Closes #77
2018-10-09 17:00:36 +02:00
Thomas Lauf
0077768843 Add annotations to intervals 2018-10-08 21:42:25 +02:00
Thomas Lauf
59f44e7ff2 Small refactoring
- use const and reference in fromJson
- reformat code
2018-10-08 21:42:25 +02:00
Thomas Lauf
043fea04e9 Fix case when JSON does not contain a start date 2018-10-08 21:42:25 +02:00
Thomas Lauf
af8cd7eb40 Refactor setRange 2018-10-08 21:42:25 +02:00
Thomas Lauf
1a24c49507 Extract creation of intervals into IntervalFactory 2018-10-08 21:42:25 +02:00
Thomas Lauf
64fd98a2bd Add help and man page for command 'undo' 2018-09-27 22:02:15 +02:00
Thomas Lauf
c0039b6ff5 Add convenience method to set range with two dates 2018-09-19 06:32:56 +02:00
Thomas Lauf
9dd106116c Let Interval inherit from Range
- Remove 1 level of indirection
- Remove public field Interval::range (instead use interval directly)
2018-09-19 06:32:56 +02:00
Thomas Lauf
9e1e604108 Rename Range::overlap to Range::overlaps 2018-09-18 21:06:33 +02:00
Thomas Lauf
c48063dec7 Remove unnecessary check from Range::startsWithin/endsWithin 2018-09-18 21:06:33 +02:00
Thomas Lauf
6f79313519 Simplify Range::encloses with Range::startsWithin && Range::endsWithin 2018-09-18 21:06:33 +02:00
Thomas Lauf
1a54bb5c37 Fix corner cases in startsWithin/endsWithin 2018-09-18 21:06:33 +02:00
Thomas Lauf
bd65b67248 Add endsWithin(Range...)
- use startsWithin/endsWithin in autoAdjust(...)
- use Range::contains in startsWithin/endsWithin
2018-09-18 21:06:33 +02:00
Thomas Lauf
592e2853e0 Move debug output about overlaps where it matters 2018-09-18 21:06:33 +02:00
Thomas Lauf
f640eb4bc5 Remove splitting of intervals in storage files
- intervals are stored within the datafile which contains the starting date
- convert segmentContains to startsWithin and unify it
- Closes #174
2018-09-18 21:06:33 +02:00
Janik Rabe
fef522c53d Fix getTracked() when last interval is empty 2018-09-18 21:06:05 +02:00
Janik Rabe
4325ffa136 Handle zero-width intervals correctly
Fixes #101
Fixes #165
Closes #164
2018-09-18 21:04:09 +02:00
Thomas Lauf
0273987ae6 Fix NPE when interval has no tags 2018-09-18 20:51:14 +02:00
Thomas Lauf
4f5eb6eb0c Make warning about new tags adhere to :quiet hint 2018-09-07 10:13:22 +02:00
Thomas Lauf
9b5793206f Remove old warnOnNewTag function 2018-09-07 10:13:22 +02:00
Thomas Lauf
f62767bc3d Some code clean-up 2018-09-07 10:13:22 +02:00
Thomas Lauf
a7da0438ca Connect database and tag-info database 2018-09-07 10:13:22 +02:00
Thomas Lauf
b32237cfb8 Add a toJson method to database
- only tag information for tags with count>0 is written out
2018-09-07 10:13:22 +02:00
Thomas Lauf
bfde36a740 Make counter in TagInfo an unsigned int 2018-09-07 10:13:22 +02:00
Thomas Lauf
7d93e23a20 Introduce add function 2018-09-07 10:13:22 +02:00
Thomas Lauf
d974742654 Add a tag database 2018-09-07 10:13:22 +02:00
Thomas Lauf
961d0212ba #167 Allow intervals to be shortened to zero width
Closes #167
2018-08-10 18:02:41 +02:00
Janik Rabe
7bc2002f47 Database: Fix an incorrect comment 2018-08-08 21:28:38 +02:00
Janik Rabe
8b48085ee8 CmdHelp: Add missing closing bracket 2018-08-08 21:13:08 +02:00
Janik Rabe
d54bc6ba55 CmdSummary: Do not extend end time beyond end of day
When showing a summary, set the end time to the current time on the
last day only.  This prevents over-counting of time when a tracked
interval covers multiple days.

Fixes test TestSummary.test_with_open_interval when the system time
is between midnight and 01:00 AM.
2018-08-08 07:12:40 +02:00
Janik Rabe
616ca4b884 #157: Change error message for non-positive IDs 2018-08-08 07:06:42 +02:00
Janik Rabe
48aa9cfdc0 CLI: Ensure IDs are non-zero
This fixes out-of-bounds accesses in several subcommands when the
invalid ID @0 is passed to the program.
2018-08-08 07:06:42 +02:00
Thomas Lauf
9489ed5b70 Fix error message 2018-07-31 09:48:03 +02:00
Thomas Lauf
1dcefd6a31 Update libshared to 230c63bd385b2a5a6ee5eb431df54b0c5c229b4d 2018-07-25 21:57:33 +02:00
Thomas Lauf
d230e40313 #9 TI-1: Make undo work with config actions 2018-07-24 18:40:11 +02:00