Giter Site home page Giter Site logo

trash-notifier's Introduction

Trash-Reminder

This Python script serves as a reminder tool for upcoming trash collection events based on a CSV file schedule. It sends Discord notifications through a webhook to keep users informed about scheduled trash pickups. The script also includes a safeguard to notify users if the CSV file is for the previous or upcoming year.

Usage

1. Clone the Repository:

git clone https://github.com/PPrzemko/Trash-Notifier.git

2. Install Dependencies:

pip install -r requirements.txt

3. Configure Script:

Rename .env.example file and edit it:

  • WEBHOOK_URL= Discord Webhook URL
  • IGNORE_SUBJECTS=["Biotonne"] #Cant yet ignore Sonderabfall - leave empty if all should be sent
  • ALL_NOTIFICATION_SUBJECTS = ["Restmüll + Gelber-Sack", "Papiertonne", "Biotonne", "Gelber-Sack", "Sonderabfall Abgabestelle"]
  • CSV_FILE_PATH=Reichelsheim-Reichelsheim-2024.csv # URL to get the CSV: https://www.reso-gmbh.de/abfuhrplaene/ ( german Excel (Semicolon separated))

4. Configure Crontab:

Edit your crontab file using the crontab -e command and add the following line to run the script at your desired frequency. For example, to run the script every day at 3:00pm

0 15 * * * /path/to/python3 /path/to/your-repository/trash_reminder.py Make sure to replace /path/to/python3 and /path/to/your-repository with the actual paths on your system.

5. Run the Script Manually:

You can also run the script manually to check for upcoming trash collection events without waiting for the cron job.

Script Details

The script logs information to a file named TrashNotify.log. Discord notifications are sent using a webhook when the specified trash collection event is approaching. If an error occurs during execution, details are logged, and a notification is sent to Discord. Feel free to modify and extend the script to adapt it for different schedules.

Disclaimer

This script is provided as-is, and the maintainers are not responsible for any issues or misuse. Use it responsibly and ensure compliance with local waste management regulations.

trash-notifier's People

Contributors

pprzemko avatar

Stargazers

J-SIT avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.