1.8. pymilestone.task.py¶
Module containing the class for a task.
-
class
pymilestone.task.Task(text, lines=2)¶ Class for a task.
- Parameters
text (str) – Text of the task. Linebreaks must be added manually by inserting
\ninto the string.lines (int) – Number of lines. Defines the height of the task. Must be adjusted, if line breaks are added. Default is 2.
-
add_date_range(key, start_date, end_date)¶ Adds a date range for the task. To add multiple date ranges for the same category, just call this method for each date range once, using the same key of the category.
- Parameters
key (str) – Key of the category.
start_date (datetime) – Start date of the task.
end_date (datetime) – End date of the task.
-
key_date_list¶ List containind the start and end date for a given key. Since it is a list, multiple date ranges can be added for the same key.
-
lines¶ Number of lines.
-
text¶ Text of the task.
-
type¶ The element type.