Skip to content

Commit

Permalink
Add elapsed time to status.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rutherford committed Dec 10, 2018
1 parent 4064f9a commit c9a96f4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog.md
@@ -1,3 +1,8 @@
## 5.3

— Added current elapsed time message to status.


## 5.2

— Added remove feature for previous logs.
Expand Down
4 changes: 4 additions & 0 deletions chronologicon/input.py
Expand Up @@ -91,6 +91,10 @@ def Status():
with open(os.path.join(CUR_FILEPATH, PRESAVE_FILENAME)) as PRESAVE_FILE:
CUR_LOG = json.load(PRESAVE_FILE)
Message('inputLogInProgress', '', CUR_LOG['DISC'] + ', ' + CUR_LOG['PROJ'])

delta = datetime.now() - datetime.strptime(CUR_LOG['TIME_START'], TIME_FORMAT)
seconds = str(delta.seconds)
Message('inputTimeElapsed', '', seconds)
except:
Message('inputNoCurrentLog')

Expand Down
1 change: 1 addition & 0 deletions chronologicon/strings.py
Expand Up @@ -47,6 +47,7 @@
'inputBackupFailed': 'Unable to back up logs.',
'inputNoCurrentLog': 'No log in progress.',
'inputLogInProgress': 'Log in progress: #x.',
'inputTimeElapsed': 'Current duration: #x seconds.',
'inputLogAborted': 'Log cancelled.',
'inputLogAbortFailed': 'Unable to cancel the current log.',
'inputStatsUpdateFailed': 'Unable to update stats file.',
Expand Down
4 changes: 2 additions & 2 deletions readme.md
@@ -1,5 +1,5 @@
# Chronologicon
v5.2181123
v5.3181210

A minimal time tracker, now rewritten for the command line. Chronologicon records your work sessions and displays graphs based on your projects.

Expand Down Expand Up @@ -110,4 +110,4 @@ directory d, -d

Other direct contributors are listed on the repository.

Chronologicon is inspired and influenced by time trackers created by [Devine Lu Linvega](https://wiki.xxiivv.com/#tracker), [Josh Avanier](https://joshavanier.github.io/#log), [Vi](https://log.v-os.ca/Home) and [Autophagy](https://github.com/autophagy/faereld). Thank you for making such wonderful things.
Chronologicon is inspired and influenced by time trackers created by [Devine Lu Linvega](https://wiki.xxiivv.com/#tracker), [Josh Avanier](https://joshavanier.github.io/#log), [Vi](https://log.v-os.ca/Home) and [Autophagy](https://github.com/autophagy/faereld). Thank you for making such wonderful things.
2 changes: 1 addition & 1 deletion setup.py
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name='chronologicon',
version='5.2',
version='5.3',
description='A minimal time tracker',
url='https://github.com/rutherfordcraze/chronologicon',
author='Rutherford Craze',
Expand Down

0 comments on commit c9a96f4

Please sign in to comment.