A tool for sending Gancio event notifications.
- Go 71.4%
- JavaScript 21.5%
- HTML 6.8%
- Dockerfile 0.3%
|
|
||
|---|---|---|
| .vscode | ||
| doc | ||
| sample_configs | ||
| src | ||
| test | ||
| .gitignore | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
gancio.notification
A tool for sending Gancio event notifications.
This is intended to be a dumb tool that fetches Gancio events for the current day through its API and sends a formatted digest of events through various notification channels. As of now it supports:
- Telegram
- IRC
- Mastodon
Building
- To build the project in your development environment run:
go build -ldflags="-s -w" -o gancio.notification
- To build a Docker image (even outside of a working Go development environment):
docker build -t gancio.notification .
Configuration
- JSON config file: copy/edit the sample config file
- Environment: check the sample env file
Note
Environment variables override the values in config file
Usage
- With env file:
set -a && . /path/to/.env && set +a && ./gancio.notification
- With config file:
./gancio.notification /path/to/config.json
- Setting/overriding individual options:
LOG_LEVEL="debug" ./gancio.notification /path/to/config.json
Docker
- use
docker run:
docker run -d \
--name gancio.notification \
-v /path/to/config.json:/etc/config.json \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
gancio.notification:latest /etc/config.json
- use
docker compose up -dwith a similar compose.yaml.
API and Dashboard
An HTTP server is automatically started to serve a REST API and a web dashboard for most common operations:
- Sending custom service messages to channels (e.g. for maintainance, important news or alerts)
- Marking and unmarking events as Important: important events will be notified daily regardless of their start date, until they are over
- Controlling the scheduler times and status
Default port is 8080 unless changed via HTTP_ADDR env variable.
- REST API is available at /api (for now check routes.go for an overview of the endpoints).
- Web dashboard is available at /.

