Skip to main content

TWDensity

Update TaskWarrior task urgency based on the density of task dues in time

This is a simple Python script that analyzes the due dates of your tasks and counts how many tasks have a due date in a window of time. For each task, the density value is the number of tasks that have a due date near to him (i.e. in the interval [due-window, due+window]).

You can define the urgency for each density level, so the urgency of a task will take into account the density of tasks around it.

You don't need to define the due date of all your tasks, but just the ones that are milestones. Then, you can set dependencies of the other tasks on the milestones.

This script takes into account dependencies.

This is a simple method to add a time estimate to your tasks:

  1. you split your tasks in smaller tasks, all requiring about the same time effort
  2. you can create multiple sub-level of time effort with your UDA (e.g. writing an email is usally a light task, while writing a report is a heavy task) project)
  3. you set the due date of your tasks

Installation

  1. pipx install twdensity
  2. Add the configuration to your .taskrc file

Usage

You need to create a new UDA named density and define the urgency for each density level.

You can also customize the window size for density calculation by defining a new UDA named densitywindow.

To update the density value, simply run twdensity command. You can also run it as a hook of on-add and on-modify events.

Example configuration

uda.densitywindow.type=numeric # define the window size for density calculation
uda.densitywindow.label=DWindow
uda.densitywindow.default=5  # default value: 5

uda.density.type=numeric # define the urgency for each density level
uda.density.label=Density
urgency.uda.density.0.coefficient=0
urgency.uda.density.1.coefficient=0.17
urgency.uda.density.2.coefficient=0.33
urgency.uda.density.3.coefficient=0.5
urgency.uda.density.4.coefficient=0.67
urgency.uda.density.5.coefficient=0.83
urgency.uda.density.6.coefficient=1
urgency.uda.density.7.coefficient=1.17
urgency.uda.density.8.coefficient=1.33
urgency.uda.density.9.coefficient=1.5
urgency.uda.density.10.coefficient=1.67
urgency.uda.density.11.coefficient=1.83
urgency.uda.density.12.coefficient=2
urgency.uda.density.13.coefficient=2.17
urgency.uda.density.14.coefficient=2.33
urgency.uda.density.15.coefficient=2.5
urgency.uda.density.16.coefficient=2.67
urgency.uda.density.17.coefficient=2.83
urgency.uda.density.18.coefficient=3
urgency.uda.density.19.coefficient=3.17
urgency.uda.density.20.coefficient=3.33
urgency.uda.density.21.coefficient=3.5
urgency.uda.density.22.coefficient=3.67
urgency.uda.density.23.coefficient=3.83
urgency.uda.density.24.coefficient=4
urgency.uda.density.25.coefficient=4.17
urgency.uda.density.26.coefficient=4.33
urgency.uda.density.27.coefficient=4.5
urgency.uda.density.28.coefficient=4.67
urgency.uda.density.29.coefficient=4.83
urgency.uda.density.30.coefficient=5

Metadata

Release files for twdensity 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twdensity 0.1.0
File Size Uploaded
twdensity-0.1.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for twdensity 0.1.0
File Interpreter ABI Platform
twdensity-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 kB

Release files / twdensity-0.1.0.tar.gz

Download URL twdensity-0.1.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7abd0a595cf675fc7bbf85f0d0307eaf11a29cb560e2ac7044c3cb387862c0af
BLAKE2b-256 checksum
How to use checksums
afaeba322816df0d0162b07c20b581166793e2b25f4047858c41f6bd0eae918b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.15.4 CPython/3.11.2 Linux/6.1.0-21-amd64

Release files / twdensity-0.1.0-py3-none-any.whl

Download URL twdensity-0.1.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16588a8ae90543b178a454db12e0483d6d1701eabd2a4581d6c26a1a0bad5fbc
BLAKE2b-256 checksum
How to use checksums
799884e26b1cceaaebc160b3b5d254ecaba2e691267609b9c040ad81ef3aeee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.15.4 CPython/3.11.2 Linux/6.1.0-21-amd64

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page