Commits

edgimar  committed f110d26

- add "DONE" to beginning of a task if it has a status of 'completed'

  • Participants
  • Parent commits 7e1f5a0

Comments (0)

Files changed (1)

File michel/michel.py

         res = []
         for subtask in self.subtasks:
             #indentations = '\t' * level
-            # add number of asterisks corresponding to depth of task
-            indentations = '*' * (level+1) + " "
+            # add number of asterisks corresponding to depth of task, followed
+            # by "DONE" if the task is marked as completed.
+            done_string = ""
+            if (subtask.status is not None) and (subtask.status == "completed"):
+                done_string = " DONE"
+            indentations = '*' * (level+1) + done_string + " "
             res.append(indentations + subtask.title)
             if subtask.task_notes is not None:
                 notes = subtask.task_notes