Chandler logo

Hooks

Chandler aims to offer a high level of customization using Hooks, thin wrappers around setuptools’ entry points.

Chandler features that rely on Hooks can be extended or changed by adding or removing entry points.

Main hooks

Below are Chandler’s most frequently used Hooks. See “hook” in the index for a complete list.

Item Add-on

Registered AddOn classes will be added to all items.

addon_class(item) -> return value ignored

Dashboard Entry Add-on

Registered AddOn classes will be added to all DashboardEntries.

addon_class(entry) -> return value ignored

Triage

triage_callable(item) -> iterable of (timestamp, triage_status) pairs
Return an empty tuple if triage can’t be calculated for the item, otherwise a timestamp when the triage_status should be applied, and a triage value.

Dashboard Triage Values

dashboard_triage_callable() -> iterable of (triage_value, name, hsv) tuples

If you want to extend the list of triage values you can set in Chandler-App’s dashboard, then implement the above hook (as a generator, or returning an iterable). The values in each returned triple are:

triage_value: The floating-point Triage value

name: A human-readable string used to display the value in the Dashboard

hsv: A three element tuple of hue, saturation and value (hue ranges from 0 to 360, and saturation and value from 0.0 to 1.0). This will be used as the background color of the cell in the dashboard.

Note that Chandler-App itself implements this hook to specify how its Triage column displays the standard Triage values (NOW, LATER and DONE).