-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
23 lines (18 loc) · 965 Bytes
/
Copy pathconfig.py
File metadata and controls
23 lines (18 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
from dotenv import load_dotenv
load_dotenv()
_BASE = os.path.dirname(os.path.abspath(__file__))
CREDENTIALS_FILE = os.getenv("CREDENTIALS_FILE", os.path.join(_BASE, "credentials.json"))
TOKEN_FILE = os.getenv("TOKEN_FILE", os.path.join(_BASE, "token.json"))
SQLITE_PATH = os.getenv("SQLITE_PATH", os.path.join(_BASE, "data", "notes.db"))
os.makedirs(os.path.dirname(SQLITE_PATH), exist_ok=True)
GMAIL_ENABLED = os.getenv("GMAIL_ENABLED", "true").lower() == "true"
GOOGLE_CALENDAR_ENABLED = os.getenv("GOOGLE_CALENDAR_ENABLED", "true").lower() == "true"
GOOGLE_DRIVE_ENABLED = os.getenv("GOOGLE_DRIVE_ENABLED", "true").lower() == "true"
NOTES_ENABLED = os.getenv("NOTES_ENABLED", "true").lower() == "true"
TASKS_ENABLED = os.getenv("TASKS_ENABLED", "true").lower() == "true"
GOOGLE_SCOPES = [
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/drive.readonly",
]