This project automates the process of fetching and displaying upcoming waste collection dates for different types of waste. It uses data from a local waste management API to maintain an up-to-date schedule in both markdown and HTML formats.
- Fetches waste collection data from a local API
- Generates an up-to-date markdown file with upcoming collection dates
- Creates a clean, responsive HTML page
- Runs daily via GitHub Actions to ensure the schedule is always current
To set up this project locally:
-
Clone the repository:
git clone https://github.com/your-username/waste-collection-schedule.git cd waste-collection-schedule -
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Set up the Python environment:
uv sync --all-extras --dev -
Run the script:
python when.py
This will fetch the latest data and update both the waste_table.md and waste_table.html files.
After setup, the script will:
- Fetch the latest waste collection data
- Update the
waste_table.mdfile with the next collection dates for each waste type - Generate a responsive HTML page in
waste_table.html
To view the upcoming waste collection dates, you can:
- Check the Waste Collection Schedule file
- Open
waste_table.htmlin a web browser
This project uses GitHub Actions to run the script daily, ensuring that the waste collection schedule is always up-to-date. The workflow file can be found in .github/workflows/update_waste_schedule.yml.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.