Merge branch 'master' of ssh://wwwjail.house/usr/local/git/base/kiosk
[kiosk.git] / gcal_trigger.py
1 #!/usr/bin/env python3
2
3 from typing import List, Optional, Tuple
4
5 import kiosk_constants as constants
6 import globals
7 import trigger
8
9
10 class gcal_trigger(trigger.trigger):
11     def get_triggered_page_list(self) -> Optional[List[Tuple[str, int]]]:
12         if globals.get("gcal_triggered"):
13             print("****** gcal has an imminent upcoming event. ******")
14             return [(constants.gcal_imminent_pagename, trigger.trigger.PRIORITY_HIGH)]
15         else:
16             return None
17
18
19 # globals.put('gcal_triggered', True)
20 # x = gcal_trigger()
21 # x.get_triggered_page_list()