Add .env configuration support

This commit is contained in:
Meghdad
2026-07-17 03:57:03 +03:30
parent 09cedc9c4b
commit a3c4fb0257
4 changed files with 62 additions and 9 deletions

View File

@@ -1,2 +1,30 @@
# daily-blackout-check
check every hour for daily power outage
Checks planned power outages and sends new notices to an Eitaa chat.
## Setup
1. Create and activate a Python virtual environment, then install dependencies:
```sh
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
2. Copy the example configuration and replace its placeholder values:
```sh
cp .env.example .env
```
3. Run the checker:
```sh
python main.py
```
The `.env` file is ignored by Git so tokens are not committed. Environment
variables supplied by the shell or GitHub Actions take precedence over `.env`.
`BILL_IDS` accepts one or more comma-separated electricity bill IDs.