Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time tracking hooks #108

Closed
arcticicestudio opened this issue Apr 7, 2018 · 0 comments
Closed

Time tracking hooks #108

arcticicestudio opened this issue Apr 7, 2018 · 0 comments

Comments

@arcticicestudio
Copy link
Owner

arcticicestudio commented Apr 7, 2018

Create two hooks to track the duration a task was active. Both hooks should be written in Python 3 and will require a Taskwarrior version >=2.4.

With totalactivetime UDA

The first hook should make use of a new UDA called totalactivetime of type duration which stores the total time in seconds. Every time a task gets stopped the value gets added to the old value. To simplify the communication with the Taskwarrior Hook v2 API the hook should make use of the taskw package which provides the bindings for Python.
Note: This requires taskw as a direct dependency and must be installed on the target system! The package is available from the AUR.

Taskwarrior integration

The second hook should be a fort from the official Taskwarrior on-modify.taskwarrior hook. It comes bundled with Taskwarrior, but can not be used via symlink, because the file is owned by the root user which prevents the script from being executed when symlinked.
The usage of the hook is also documented in the official Timewarrior docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant