Spaces:
Build error
Build error
File size: 1,494 Bytes
86ffe15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # config.py
import os
from dotenv import load_dotenv
load_dotenv() # loads variables from .env file
class Config:
# Paths
PDF_PATH = os.getenv("PDF_PATH", "Gmail - [Confidential] Your complaint about Bank of Scotland plc.pdf")
# Dates
START_DATE = os.getenv("START_DATE", "2025-06-15") # YYYY-MM-DD
# Emails
LANDLORD_EMAIL = os.getenv("LANDLORD_EMAIL", "My_Clarion_Housing_payments@civicaepay.co.uk")
CC_LANDLORD = os.getenv("CC_LANDLORD", "CustomerServices@myclarionhousing.com")
YOUR_EMAIL = os.getenv("YOUR_EMAIL", "dwayne.galloway@googlemail.com")
YOUR_PASSWORD = os.getenv("YOUR_PASSWORD", "") # Gmail App Password
FOS_EMAIL = os.getenv("FOS_EMAIL", "Candice.Smith@cases.financial-ombudsman.org.uk")
# SMTP
SMTP_SERVER = os.getenv("SMTP_SERVER", "smtp.gmail.com")
SMTP_PORT = int(os.getenv("SMTP_PORT", 587))
# Telegram (optional)
TELEGRAM_BOT_TOKEN = os.getenv("TELEGRAM_BOT_TOKEN", "")
TELEGRAM_CHAT_ID = os.getenv("TELEGRAM_CHAT_ID", "")
# Gmail API credentials (for watching inbox)
GMAIL_CREDENTIALS_FILE = os.getenv("GMAIL_CREDENTIALS_FILE", "credentials.json")
GMAIL_TOKEN_FILE = os.getenv("GMAIL_TOKEN_FILE", "token.pickle")
# Scheduling interval (in minutes)
CHECK_INTERVAL = int(os.getenv("CHECK_INTERVAL", 60))
@classmethod
def get_start_date(cls):
from datetime import datetime
return datetime.strptime(cls.START_DATE, "%Y-%m-%d") |