From 233d4e7fb7c216c9f528d78c8e0b58d80ca82aa9 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 31 Dec 2023 20:57:54 +0000 Subject: [PATCH] Ignore some events in terms of gap finding --- agenda/data.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/agenda/data.py b/agenda/data.py index 7d9b0a3..c776c42 100644 --- a/agenda/data.py +++ b/agenda/data.py @@ -335,6 +335,9 @@ def busy_event(e: Event) -> bool: }: return False + if e.title in ("IA UK board meeting", "Mill Road Winter Fair"): + return False + if e.name == "conference" and not e.going: return False if not e.title: @@ -475,7 +478,9 @@ async def get_data( busy_events = [ e for e in sorted(events, key=lambda e: e.as_date) - if e.as_date > today and e.as_date < next_year and busy_event(e) + if e.as_date > today + and e.as_date < (today + timedelta(days=365 * 2)) + and busy_event(e) ] gaps = find_gaps(busy_events)