From d54246f4b522e2c5abb9f552fd5d5f2b1e8c53f5 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 31 Mar 2022 00:43:21 -0400 Subject: [PATCH] removing print statements --- calendar_grabber.py | 1 + pi-calendar-sign.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/calendar_grabber.py b/calendar_grabber.py index 32ae1b7..8deb5e3 100644 --- a/calendar_grabber.py +++ b/calendar_grabber.py @@ -12,6 +12,7 @@ class CalGrab(object): def __init__(self, auth_file, calendars=[], callbacks=[]): self.calendars = calendars + # TODO: Add multiple calendar support self.callbacks = callbacks self.creds = service_account.Credentials.from_service_account_file( auth_file, scopes=['https://www.googleapis.com/auth/calendar.readonly']) diff --git a/pi-calendar-sign.py b/pi-calendar-sign.py index cdee4ab..1f76180 100644 --- a/pi-calendar-sign.py +++ b/pi-calendar-sign.py @@ -12,6 +12,7 @@ from calendar_grabber import CalGrab TIMEZONE = timezone('US/Eastern') WORK_START = time(9, 00) WORK_STOP = time(17, 00) +CALENDAR = "lucas.oskorep@gmail.com" COLOR_RED = [100, 0, 0] COLOR_GREEN = [0, 100, 0] @@ -24,6 +25,7 @@ i2c = busio.I2C(board.SCL, board.SDA) lcd = character_lcd.Character_LCD_RGB_I2C(i2c, lcd_columns, lcd_rows) + def is_event_active(events, now): for event in events: if event.start_time < now and event.end_time > now: @@ -61,7 +63,7 @@ def process_events(events): def main(): - cg = CalGrab("./.auth.json", "loskorep@productiveedge.com", [process_events]) + cg = CalGrab("./.auth.json", CALENDAR, [process_events]) cg.update_at_interval(5)