Logo Lanfrica

annkimathi/KPLCInterruptions

Domain:

digital infrastructure

Record type:

software
Creator:
ann
Host:
This Python application is designed to automate the process of notifying users about Kenya Power planned power interruptions. It scrapes information from a specified URL, processes PDF files, and sends out email notifications. # Kenya Power Planned Power Interruption Notifier ## Description Python code designed to automate the process of notifying users about planned **KPLC** (**Kenya Power and Lighting Company**) power interruptions. It scrapes information from a specified URL, processes the latest PDF file, and sends out email notifications. ## Prerequisites - **Tesseract**: This application uses Tesseract for OCR (Optical Character Recognition). Make sure to install it and add it to your system path. For installation guide, please refer to the Tesseract Documentation. - **Poppler**: This application also requires Poppler for PDF rendering. Follow the instructions below to install it on your system: ### Linux 1. Update your package list: ```bash sudo apt-get update ``` 2. Install Poppler: ```bash sudo apt-get install poppler-utils ``` ### Windows 1. Download the latest Poppler binary from this link. 2. Extract the downloaded archive. 3. Add the `bin` directory from the extracted archive to your system's PATH. ## Features - Web scraping to gather power interruption data - PDF parsing for detailed information - Email notifications to multiple recipients - Logging for better traceability and debugging - Environment variable support for configuration ## Installation 1. Clone the repository: ```bash git clone github.com ``` 2. Navigate into the project directory: ```bash cd KPLCInterruptions ``` 3. Install the required packages: ```bash pip install -r requirements.txt ``` ## Environment Variables The application uses the following environment variables: - `MAIL_USERNAME`: Your email address - `MAIL_PASSWORD`: Your email password - **Note**: If you are using Gmail as your email service, this should be the "App Password" that you generate from your Gmail account settings, NOT your Gmail password. - `RECIPIENTS_LOCATIONS`: Comma-separated list of email recipients paired with their locations, separated by a colon. Copy the `.env. …