Introduction of color blocks that produce a color based on an attribute
A color block is basically a space with a background color and can be inserted with a special placeholder for list formatting (not in this commit). The color is determined by attributes of the todo. This implementation focusses on the due date. A color is assigned on a range from green to yellow to red, where red is overdue, yellow is nearly overdue and green is still 'safe'. This is relative to the length of the todo item (due minus start date). The start date can be determined in multiple ways: * an explicit start date with the t: tag * the due date minus the recurrence period (rec: tag) The recurrence takes precedence over the explicit start date in calculating the length. The primary reason is that t: is mainly used for filtering purposes. This is still experimental, I'm just pushing my work in progress here. TODO: (B) Add tests (C) Determine color based on other attributes such as importance, priority or a value of a user-specified tag (C) Revisit the Colors class to fit nicely in the design
Showing
topydo/lib/Colorblock.py
0 → 100644
Please register or sign in to comment