GothenburgBitFactory / tasklib

A Python library for interacting with taskwarrior databases.
http://tasklib.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
147 stars 28 forks source link

Add support to measure active time of tasks #55

Closed lyz-code closed 4 years ago

lyz-code commented 6 years ago

Nowadays the way to manage the time spent in a task in taskwarrior is using hooks to add annotations to the tasks.

Nevertheless if you start and stop a task several times your annotations get overflowed, furthermore that information already exists in the undo.data file.

That's the reason of this merge request. To accomplish that I needed to:

  1. Get the available task attributes to know what were the keys of undo.data
  2. Create a parser of undo.data and save it in an object called history
  3. Create a method to extract the active time of a task from that history.

That features are accomplished by:

Sorry for the huge PR :( . If you change your mind, I can split up this PR into 3 smaller ones.

@robgolding close the other MR if you feel like it.

lyz-code commented 4 years ago

Closing for inactivity