From 011cc71d227a5feda0614b5140dc8796bfd2033a Mon Sep 17 00:00:00 2001 From: Campbell Alden Date: Sat, 20 Aug 2022 11:40:43 +0900 Subject: [PATCH] only report completed tasks at the end of the day --- dump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump.py b/dump.py index 69a57ad..f3326ae 100644 --- a/dump.py +++ b/dump.py @@ -102,7 +102,7 @@ def generate_signoff_message(target_tag): format_tasks = make_recursive_formatter(LogbookFormatter()) import datetime today_str = str(datetime.datetime.today()).split()[0] - reportable = list(filter(lambda t: has_tag(t, target_tag) and t['stop_date'] == today_str, things.logbook())) + reportable = list(filter(lambda t: has_tag(t, target_tag) and t['stop_date'] == today_str and t['status'] == 'completed', things.logbook())) structured_tasks = tasks_to_heirarchy({ 'title': 'Stopping now', 'notes': '', 'status': '' }, reportable) return format_tasks(structured_tasks, 0)