Commit graph

21 commits

Author SHA1 Message Date
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
Thomas Lauf
14bed139f6 Update copyrights
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-04 22:44:44 +02: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
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
Tomas Babej
e5870380a4
doc: Update copyright to 2021 2021-01-02 02:52:39 -05:00
Thomas Lauf
ad58309159 Update Copyright
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-04-19 12:41:23 +02:00
Thomas Lauf
5ab9b86e56 Set python version explicitly to python3
- Closes #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-02-23 21:32:39 +01:00
Thomas Lauf
3f3c4c3108 Switch to python 3
- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-12-28 18:52:19 +01:00
Michael Eischer
8053ccf68e Fix calculation of totals longer than a day
datetime.timedelta stores days, seconds and microseconds. Therefore the
seconds attribute only stores timedeltas of less than 24 hours. Use
total_seconds() instead which properly accounts for the days part.
2019-10-18 10:56:50 +02:00
Thomas Lauf
b5acfed98f Refactor totals.py
- add main
- move algorithm to function
- use __future__ module
- introduce new style formatting
- restructure test_totals.t accordingly
- add test for empty range
- add tests for colored output
2018-05-10 19:22:34 +02:00
Thomas Lauf
147865b50b Fix time output in totals.py
- Convert UTC time to local time in output
- Change single quote to double quote
- Use new style python formatting
- Make tests use current time
- Fix test for open interval
2018-05-09 18:25:16 +02:00
Simon Ruderich
2271bd9eea Use https:// link for opensource.org 2018-03-16 23:11:08 +01:00
Thomas Lauf
f8ee042bf0 Small refactoring 2018-02-18 23:09:37 +01:00
Davis
68fdcc0b20
Fixed error from totals.py while timer is active
I got the following error when I tried to run totals.py while a task was not finished:

    Traceback (most recent call last):
      File "/home/davis/.timewarrior/extensions/totals.py", line 101, in <module>
        end = datetime.datetime.strptime(configuration['temp.report.end'], DATEFORMAT)
    KeyError: 'temp.report.end'

This change fixed that for me.
2018-02-14 00:49:53 -05:00
Paul Beckingham
d55ca5b474 Ext: Updated totals.py for both Python 2 and 3 2017-04-14 23:59:24 -04:00
Thomas Lauf
310f48973e extensions: Make extensions conform with PEP8 2017-03-01 21:20:35 +01:00
Thomas Lauf
8ad54f9bfd TI-40: totals.py extension script fails with an error
- Improve totals.py extension script:
- Fix display issue if tags are shorter than string 'Totals'
- Fix issue when totals.py is called on empty database
- Add tests: test_totals.t
2017-02-14 23:33:02 +01:00
Paul Beckingham
b257271fec Ext: Added :color :nocolor support 2016-07-30 15:34:53 -04:00
Paul Beckingham
dfc47f6c37 Extensions: Added report that summarizes time by tag 2016-07-23 11:51:34 -04:00