Spaces:
Build error
Build error
| # 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)) | |
| def get_start_date(cls): | |
| from datetime import datetime | |
| return datetime.strptime(cls.START_DATE, "%Y-%m-%d") |