This is a simple matrix bot that will monitor a calendar given by a URL and post events as HTML
and Plain text
according to the given templates. The bot is intended to be run in a docker imager, but feel free to build the the application like so:
go build cmd/calendar-bot/calendar-bot.go
---
version: "3.9"
services:
calendar-bot:
image: gueldenstone/calendar-bot:latest
command: -config /config.yaml
volumes:
- "<path_to_config>:/config.yaml"
- /etc/localtime:/etc/localtime:ro
# Configuration file for the calendar-bot
homeserver: matrix.org
rooms:
- "#test-the-bot:matrix.org"
calendarURL: "<calendar_url>"
nofifyTime: "13:33"
username: "<matrix_username>"
password: "<supersecretpassword>"
There are only some basic tests with the snapshot of my local hackspaces calendar. You can run them like so:
go test -v ./...