Skip to content

gueldenstone/calendar-bot

Repository files navigation

Calendar-Bot

test workflow build

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

Usage

---
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

Example configuration

# 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>"

Tests

There are only some basic tests with the snapshot of my local hackspaces calendar. You can run them like so:

go test -v ./...