This code publishes RMM Events from Wild Apricot as an .ics file. It also creates a .csv template for importing to BHam365, syncs events with Discord, and sends weekly emails to the marketing team with upcoming events.
The "Events to .ics" workflow runs automatically overnight at 2AM CST via github actions, and it runs update_ics.py. Log files and historical .ics data are stored as a zipped artifact in the "Events to .ics workflow" output. The "Email Events" workflow runs automatically weekly at at 5:30PM CST via github actions, and it runs email_events.py. the Discord Events sync workflow runs automatically overnight at 2AM CST via github actions, it Imports the upcoming events handler from the wa_events_functions.py library, compares that list with similar events alreay posted to discord
Most functions are contained within the #wa_events_functions.py
- Event Retrieval: Fetches upcoming event data from Wild Apricot. Only events with the "BHam Now" tag, are retrieved. Past events, and private events are automatically filtered from the retrieval.
- Event Reformatting: Events are reformatted to be passed to a .ics, and a unique uuid is created. Titles are updated to "{event_tag} class: {class name}", for example "Intro to cutting boards" is renamed to "Woodworking Class: Intro to cutting boards"
- Event Publishing: Publishes the new event data to Wild Apricot in the .ics file format, enabling easy sharing and integration with various calendar applications. https://redmountainmakers.org/resources/Events_Conversion/bham_now_export.ics
- CSV Template Creation: Generates a .csv template suitable for importing event data into BHam365. (This is not actively used)
- Email Notifications: Sends out weekly email notifications to the marketing team detailing the upcoming events to aid in promotional efforts.
- Email list Defined in wild apricot admin console members->groups->Marketing class list
1.*General Functionality: Imports the upcoming events handler from the wa_events_functions.py library, compares that list with similar events alreay posted to discord 2. Added events: Adds events that are not already on discord 3. Changed Events: Checks if an event is already on discord (Indirectly via the wild apricot Event_ID, and updates the Title, Description (URL), start time, end time, or location, if those changed on wild_apricot 4. Deleted Events: If there is an event on discord that is no longer in wild apricot, it gets deleted from discord
Feel free to fork the project and submit pull requests for any enhancements.
For more information, contact the RMM general email at secretary@redmountainmakers.org and it will be forwarded appropriately.