moving emails to config.json
This commit is contained in:
@@ -5,5 +5,6 @@ Assumes python3 as the base:
|
|||||||
* pip install -r requirements.txt
|
* pip install -r requirements.txt
|
||||||
* sudo pip install adafruit-circuitpython-charlcd
|
* sudo pip install adafruit-circuitpython-charlcd
|
||||||
* create your .auth.json file with a corresponding API key from GCP
|
* create your .auth.json file with a corresponding API key from GCP
|
||||||
|
* edit config.json to have a list of all the emails you want to track
|
||||||
* edit pi-calendar-sign.py to have the calendar names that you would like to receive events for.
|
* edit pi-calendar-sign.py to have the calendar names that you would like to receive events for.
|
||||||
* python pi-calendar-sign.py
|
* python pi-calendar-sign.py
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[
|
||||||
|
"(your email here)"
|
||||||
|
]
|
||||||
+6
-1
@@ -1,3 +1,5 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
from calendar_grabber import CalGrab
|
from calendar_grabber import CalGrab
|
||||||
|
|
||||||
|
|
||||||
@@ -8,7 +10,10 @@ def process_events(events):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
cg = CalGrab("./.auth.json", "loskorep@productiveedge.com", [process_events])
|
with open("config.json") as f:
|
||||||
|
CALENDARS = json.load(f)
|
||||||
|
print(CALENDARS)
|
||||||
|
cg = CalGrab("./.auth.json", CALENDARS, [process_events])
|
||||||
cg.update_at_interval(5, 15)
|
cg.update_at_interval(5, 15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
from datetime import datetime, time
|
|
||||||
|
|
||||||
import adafruit_character_lcd.character_lcd_rgb_i2c as character_lcd
|
import adafruit_character_lcd.character_lcd_rgb_i2c as character_lcd
|
||||||
import board
|
import board
|
||||||
import busio
|
import busio
|
||||||
|
import json
|
||||||
from pytz import timezone
|
from pytz import timezone
|
||||||
|
from datetime import datetime, time
|
||||||
|
|
||||||
from calendar_grabber import CalGrab
|
from calendar_grabber import CalGrab
|
||||||
|
|
||||||
@@ -11,9 +11,9 @@ TIMEZONE = timezone('US/Eastern')
|
|||||||
WORK_START = time(9, 00)
|
WORK_START = time(9, 00)
|
||||||
WORK_STOP = time(17, 00)
|
WORK_STOP = time(17, 00)
|
||||||
WORK_DAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
|
WORK_DAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
|
||||||
CALENDARS = [
|
with open("config.json") as f:
|
||||||
"",
|
CALENDARS = json.load(f)
|
||||||
] # Add your desired calendar here
|
print(CALENDARS)
|
||||||
|
|
||||||
COLOR_RED = [100, 0, 0]
|
COLOR_RED = [100, 0, 0]
|
||||||
COLOR_GREEN = [0, 100, 0]
|
COLOR_GREEN = [0, 100, 0]
|
||||||
|
|||||||
Reference in New Issue
Block a user