Manually filter logbook entries since the last='d1' style seems to miss entries
This commit is contained in:
parent
34a43f370f
commit
3eb5a526d1
1 changed files with 3 additions and 2 deletions
5
dump.py
5
dump.py
|
|
@ -102,8 +102,9 @@ class LogbookFormatter:
|
||||||
|
|
||||||
def generate_signoff_message(target_tag):
|
def generate_signoff_message(target_tag):
|
||||||
format_tasks = make_recursive_formatter(LogbookFormatter())
|
format_tasks = make_recursive_formatter(LogbookFormatter())
|
||||||
todays_logged_items = things.logbook(last='1d')
|
import datetime
|
||||||
reportable = list(filter(lambda t: has_tag(t, target_tag), todays_logged_items))
|
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()))
|
||||||
structured_tasks = tasks_to_heirarchy({ 'title': 'Stopping now', 'notes': '', 'status': '' }, reportable)
|
structured_tasks = tasks_to_heirarchy({ 'title': 'Stopping now', 'notes': '', 'status': '' }, reportable)
|
||||||
return format_tasks(structured_tasks, 0)
|
return format_tasks(structured_tasks, 0)
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue