IRD-News-Notifier

IRD News Notifier

This Python script automatically scrapes the Sri Lankan Inland Revenue Department (IRD) “News and Notices” page. If it finds any new announcements published on the current day, it sends a consolidated email notification to a specified recipient using Gmail.

This is ideal for running as a daily automated task (e.g., a cron job) to stay updated on new tax circulars, notices, and publications.

Features

Prerequisites

Setup

  1. Clone the Repository
    git clone [https://github.com/your-username/ird-annulments-tracker.git](https://github.com/your-username/ird-annulments-tracker.git)
    cd ird-annulments-tracker
    
  2. Create a Virtual Environment (Recommended)
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install Dependencies Create a requirements.txt file (as shown above) in the project directory and run:
    pip install -r requirements.txt
    
  4. Set Environment Variables The script requires three environment variables to function. You must set these in your environment before running the script.

    • SENDER_EMAIL: The Gmail address the email will be sent from (e.g., my-notifier@gmail.com).
    • APP_PASSWORD: The 16-character Google App Password you generated.
    • RECEIVER_EMAIL: The email address where you want to receive the alerts.

    On Linux/macOS:

    export SENDER_EMAIL="your-email@gmail.com"
    export APP_PASSWORD="your-16-char-app-password"
    export RECEIVER_EMAIL="recipient@example.com"
    

    On Windows (Command Prompt):

    set SENDER_EMAIL="your-email@gmail.com"
    set APP_PASSWORD="your-16-char-app-password"
    set RECEIVER_EMAIL="recipient@example.com"
    

Usage

Once your environment variables are set and dependencies are installed, just run the script:

```bash python ird_news_notifier.py