From 01409b72468aabb76be79ac1a27b03f82d45c344 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 18 Oct 2024 09:37:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20README.md=20for=20Paris?= =?UTF-8?q?=20OSM=20Event=20Watcher=20=F0=9F=87=AB=F0=9F=87=B7=F0=9F=93=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c2d577b..c5394b7 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,21 @@ -# OSM Paris Event Watcher +# Paris OSM Event Watcher -This Python script periodically checks the OpenStreetMap Calendar API for upcoming events in Paris, particularly focused on hack weekends. If it finds any events, it sends an email notification with the event details. +This Python script monitors the OpenStreetMap Calendar for upcoming events in Paris and sends email alerts if any are found. It specifically checks the OSM Calendar API for any events that are scheduled to take place in Paris. ## Features -- Fetches event data from the OSM Calendar API for events located in France. -- Filters for events that are specifically in Paris. -- Sends an email notification for each event found in Paris. +- **Event Filtering**: Filters the list of events retrieved from OSMCal to find those located in Paris. +- **Email Notifications**: Sends a detailed email notification listing the upcoming events found in Paris. -## Requirements +## Installation -- Python 3.8 or later. -- `requests` library. +Clone the repository to your local machine: -To install the required Python library, run: +```bash +git clone https://git.4angle.com/edward/check-osmcal-for-paris-events +``` + +Ensure you have `Python 3` and `requests` library installed: ```bash pip install requests @@ -21,13 +23,18 @@ pip install requests ## Usage -To run the script, simply execute: +The script can be executed manually by running: ```bash -python3 check.py +python3 /path/to/check.py ``` -Make sure to run it in an environment where it has network access to both the OSM Calendar API and your SMTP server. +However, it is intended to be run periodically as a cron job. Here's an example cron job setup that executes the script every 6 hours: + +``` +# Check the OpenStreetMap Calendar API for upcoming events in Paris and send an alert +0 */6 * * * /usr/bin/python3 /parth/to/check.py +``` ## Configuration @@ -37,12 +44,13 @@ You will need to configure the following variables within the script: - `MAIL_TO`: The recipient email address. - `SMTP_HOST`: The hostname of the SMTP server you are using to send emails. -These are currently set to default values and will need to be updated to reflect your actual email setup. +## Support -## Contact +For support, contact Edward Betts at [edward@4angle.com](mailto:edward@4angle.com). -For any queries or further customization, please contact: -Edward Betts +## Contributing + +Contributions to this project are welcome. Please fork the repository and submit a pull request. ## License