removing print statements
This commit is contained in:
@@ -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'])
|
||||
|
||||
+3
-1
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user