Commit graph

1626 commits

Author SHA1 Message Date
Thomas Lauf
8256b5e625 Removing a stray space char
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-28 21:17:26 +02:00
Thomas Lauf
037550b791 '-h' should show help
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-18 18:40:26 +02:00
Thomas Lauf
6bb4f981cb Merge branch '212-fix-help-handling' of git://github.com/sruffell/timewarrior into sruffell-212-fix-help-handling 2019-05-07 22:08:23 +02:00
Thomas Lauf
d39af37db2 Update libshared to 4178b49db1c5fed5006a4ab6aa2df3f9937f770b
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-03 17:04:07 +02:00
Thomas Lauf
ba9cfc95b9 Rename variables
- for better readability

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-12 16:13:39 +02:00
Thomas Lauf
297d9e3c19 Remove comments
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-12 15:49:05 +02:00
Thomas Lauf
920e3b4019 Add field reference_hour, extract determination of color for hour label
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 23:13:41 +02:00
Thomas Lauf
a6b9e4204c Use fields directly instead of passing them as function parameters
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 22:43:27 +02:00
Thomas Lauf
0510b59460 Make cell width a field
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 22:23:48 +02:00
Thomas Lauf
186dd8e3de Fix padding for determined hour range (+1h before and after)
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:39:28 +02:00
Thomas Lauf
36d7b6f387 Consider open track only until reference datetime when determining hour range
- Close #107

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:39:28 +02:00
Thomas Lauf
b3799ede03 Use early return
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:07:57 +02:00
Thomas Lauf
6f439097d6 Make use of a default value
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 10:46:39 +02:00
Thomas Lauf
a672fd0647 Apply exclusions to open interval only within range within interval start and now
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 10:42:08 +02:00
Thomas Lauf
daec6b1fae Clean up .gitignore files
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-10 12:08:42 +02:00
Thomas Lauf
ea9a5e341e Make parameter 'configuration' a const reference
- Clang-Tidy: The parameter 'configuration' is copied for each invocation but only used as a const reference;

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-10 12:02:07 +02:00
Thomas Lauf
42cb7273cd Inject reference datetime (= now) into chart
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-10 12:00:25 +02:00
Thomas Lauf
b4a15b3c84 Use internal fields color_today and color_holiday in getDayColor
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-09 16:23:37 +02:00
Thomas Lauf
9fcadaee1c Reorder and group function declarations
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-09 16:23:37 +02:00
Thomas Lauf
58c392b0b9 Move color definitions into configuration 2019-04-09 16:23:37 +02:00
Thomas Lauf
4ef248b973 Extract more parameters into chart configuration 2019-04-09 16:23:37 +02:00
Thomas Lauf
e2bd076357 Extract chart configuration into separate class 2019-04-09 16:23:37 +02:00
Thomas Lauf
40ea90c000 Update libshared 2019-04-09 16:23:37 +02:00
Shaun Ruffell
c76d004897 #212: "--help" should show help, not considered to be a tag.
This change makes any instance of '--help' on the command line to be made the
command for this particular invocation.
2019-04-07 16:48:24 -05:00
Thomas Lauf
747d560630 Use dynamic_cast instead of static_cast to downcast from a base to a derived class 2019-02-26 22:22:21 +01:00
Thomas Lauf
04adb50480 Add curly braces 2019-02-26 22:20:06 +01:00
Shaun Ruffell
01d1142480 #198: Add '%' to operator list in quote if needed.
Since the Lexer is looking for '%' as operators, it too needs to be quoted in
order to allow the data files to be parsed properly.
2019-02-26 21:56:55 +01:00
Shaun Ruffell
465d3bd676 Database: Display error message if tags database is not in expected format.
Had an early tags database conversion script that was not labeling the tag
counts with "count". Instead of a segfault, this prints an error message to
hopefully point the user in the correct location to look for the error.
2019-02-26 21:56:55 +01:00
Shaun Ruffell
7c5503f962 CmdJoin: Fix segment fault on join.
Code was attempting to dereference the end () iterator, which is invalid.

Since sets are already ordered, we can use the first and last element directly
instead of using the min/max functions.

Fixes a bug introduced in ( 8ce9e83ab5 "TI-93 #97 Make CLI::getIds() return a
set to guarantee uniqueness of ids" )
2019-02-26 21:56:55 +01:00
Thomas Lauf
85e2ec741f Remove line breaks
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-02-15 10:09:41 +01:00
Thomas Lauf
4c71aa0ac7 Fix padding
Closes #11

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-02-15 10:09:04 +01:00
Thomas Lauf
a01c2bf19e Extract chart rendering into its own class (fixup) 2019-02-01 08:19:30 +01:00
Thomas Lauf
22902fe9a1 Make Chart::render return a string instead of writing to std::cout (fixup) 2019-01-31 23:16:48 +01:00
Thomas Lauf
8e649a9456 Extract calculation of total_width from day-loop 2019-01-31 23:06:44 +01:00
Thomas Lauf
cf88f1585a Use fields directly instead of via parameters to calculate indent size 2019-01-31 23:06:44 +01:00
Thomas Lauf
c7b7b483ba Move configuration for label to contructor 2019-01-31 23:06:44 +01:00
Thomas Lauf
0523262115 Reduce interface of Chart to function 'render' 2019-01-31 23:06:44 +01:00
Thomas Lauf
49f25ba7d7 Make functions of Chart member functions 2019-01-31 23:06:44 +01:00
Thomas Lauf
c562f3fc81 Make Chart::render return a string instead of writing to std::cout 2019-01-31 23:06:44 +01:00
Thomas Lauf
365ae27e49 Extract chart rendering into own class 2019-01-31 23:06:44 +01:00
Thomas Lauf
cc0136a73a Use padding directly instead of handing over padding_size 2019-01-24 22:59:53 +01:00
Thomas Lauf
82e22380a9 Extract render method 2019-01-24 22:33:10 +01:00
Thomas Lauf
3feb1b5c5a Replace string axis_type with boolean with_internal_axis 2019-01-22 23:29:41 +01:00
Thomas Lauf
5c320e78b4 Extract rules from getIndentSize 2019-01-22 23:28:31 +01:00
Thomas Lauf
6cd1d7c804 Extract rules from renderInterval
- Simplify interval coloring (extract rules from helper::intervalColor)
- Add a default color for intervals without tags
2019-01-21 14:18:16 +01:00
Thomas Lauf
c5f8583355 Separate filtering and rendering of holidays 2019-01-21 14:18:16 +01:00
Thomas Lauf
ccb41e6501 Extract 'now' from getDayColor
- Use early returns
2019-01-21 14:18:16 +01:00
Thomas Lauf
c30f4b1e66 Extract color from renderDay/renderWeekday 2019-01-21 14:18:16 +01:00
Thomas Lauf
34d022d374 Add some curly braces 2019-01-21 14:18:16 +01:00
Thomas Lauf
c4f6213f49 Extract rules from renderExclusionBlocks 2019-01-21 14:18:16 +01:00