tobiasd e782da2006
All checks were successful
continuous-integration/drone/push Build is passing
Merge pull request 'chore(deps): update dependency wheel to v0.46.1' (#25) from renovate/wheel-0.x into main
Reviewed-on: #25
2025-04-09 07:57:03 +00:00
2024-07-23 11:20:14 +02:00
2025-01-17 10:24:47 +01:00
2024-12-23 18:10:34 +00:00
2024-12-23 18:10:34 +00:00
2024-12-23 18:19:14 +00:00
2024-12-19 21:15:06 +00:00
2024-09-10 09:27:02 +00:00
2024-07-23 11:20:14 +02:00
2024-07-23 11:20:14 +02:00

Event Notifier

in docs.fsfe.org Build Status REUSE status

General

This repo contains a simple service that generates event notifications from the events submitted on the fsfe webpage.

More specifically, it parses the event xml files in fsfe-website/fsfe.org/events/YYYY/event-yyyymmdd-nn.*.xml and from those files sends emails and creates events.

In the group_info.toml file local groups can be configured with the email they want event notifications to be sent to, and what languages they prefer they events in. If a group has German as a preferred language before say, English, then if an event is available in German it will be emailed out and put on the calendar in German. It will fall back though each preferred language, before giving up and using the first available language it finds for the event.

It will send an email about each new event to that groups defined email(s) and then record that it has emailed that event in a sqlite database. It should not email repeatedly for the same event, and each event should be emailed out in the groups preferred language, assuming the event is available in it.

It will find or create a calendar for each local group an event is identified as being associated with, and then add any events between the specified timeframe in the script. Each run it deletes very old events (>2 years, at time of writing), and every event that matches the pattern of an event made by it. It decides this based on if the first line matches the pattern "event-[0-9]{8}-[0-9]{2}". Events not matching this pattern, eg human added events, are ignored. If an event does match this pattern, it will delete the event, and it will presumably be recreated by the event creation section of the script later. This methodology allows for events removed in the website repo being removed from calendars, and updating event details. The calendars it generates can be seen on the fsfe groups page.

When it creates a new calendar for a new group this a share link must be manually generated for this calendar and added to the groups page on the website.

Tool help message:

usage: event-notifier.py [-h] [--dry-run] [-v]
                         caldav_url smtp_url username password

Generate notifications and calendars for for fsfe events

positional arguments:
  caldav_url     url of caldav server
  smtp_url       url of smtp server
  username       username to access servers with
  password       password to access servers with

options:
  -h, --help     show this help message and exit
  --dry-run      Perform a dry run, not altering anything on the server, but
                 printing messages as though it is.
  -v, --verbose  Increase verbosity of output
Description
Simple script to send out notifications for new community events
Readme 131 KiB
Languages
Python 97.6%
Dockerfile 2.4%