Esempio n. 1
0
class EnvProfile:

    common_dir = Functions.get_curr_parent_dir() + "/0 - Secrets/SAL/common"
    env_profiles_dir = Functions.get_curr_parent_dir(
    ) + "/0 - Secrets/SAL/EnvProfiles"

    def __init__(self, env_key):

        self.env_key = env_key

        self.google_sheets_creds = self.common_dir + "/Google API - StevensLTBots.json"
        self.groupme_access_token = self.common_dir + "/Groupme Access Token.txt"
        self.yahoo_weather_api_json = self.common_dir + "/yahoo_weather_api_creds.json"

        self.profile_json_path = self.get_profile_json_path()
        self.profile_dict = Functions.parse_json(self.profile_json_path)

    def get_profile_json_path(self):
        for filename in os.listdir(EnvProfile.env_profiles_dir):
            if self.env_key == filename.split(".json")[0]:
                return EnvProfile.env_profiles_dir + "/" + filename
        raise UserWarning(
            "env_key {} does not exist in EnvProfiles dir".format(
                self.env_key))
Esempio n. 2
0
from General import Functions

guardian_api_key_path = open(
    Functions.get_curr_parent_dir("\\API Keys\\Guardian API Key.txt")).read()
Esempio n. 3
0
from General import Functions

google_sheets_json = Functions.get_curr_parent_dir("\\API Keys\\Google API - StevensLTBots.json")

groupme_access_token = open(Functions.get_curr_parent_dir("\\API Keys\\Groupme Access Token.txt")).read()
groupme_character_limit = 450
groupme_tab = "    "

stevens_update_duration = 60 * 60 * 24
from General import Functions

# !/usr/bin/env python
# title           :	main.py
# description     :	This script posts Google calendar events to a Pod/Display
# author          :	Kelli Webber
# date            :	2018-12-12
# last updated    :	2019-10-08
# usage           :	main.py
# notes           :	calendarSettings.csv required (Column 1: Pod IPs | Column 2: Calendar IDs)
# When prompted to allow access, use account with permission to view all
# calendars in CSV file
# python_version  :	3.7
# ==============================================================================================

# Script assumes admin password data is uniform across all Pods

calendar_api_token_path = Functions.get_curr_parent_dir(
    "\\API Keys\\Stevens LT Solstice token.json")
google_calendar_credentials_path = Functions.get_curr_parent_dir(
    "\\API Keys\\Google Calendar credentials (eric.wonbin.sang).json")

google_sheets_json = Functions.get_curr_parent_dir(
    "\\API Keys\\Google API - StevensLTBots.json")
Esempio n. 5
0
from General import Functions


spotify_credentials_file_path = Functions.get_curr_parent_dir() + "/0 - Secrets/TwitchHelper/spotify_credentials.json"

song_update_time = 0.2 * 1000000
window_adjust = 2