Matrix.org Simple alert/notifications HTTP API bot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Bastard Operator From Hell 960aa1613b initial commit 9 months ago
bin initial commit 9 months ago
conf initial commit 9 months ago
src initial commit 9 months ago
Dockerfile initial commit 9 months ago
LICENSE initial commit 9 months ago
README.md initial commit 9 months ago
build_docker.sh initial commit 9 months ago
run_docker.sh initial commit 9 months ago

README.md

Matrix.org Simple alert/notifications HTTP API bot

Uses the simple python matrixcli from https://github.com/saadnpq/matrixcli.git

Installation

Build the image using docker/podman

./build_docker.sh

The bot needs to be joined in a room before using it as a bot, you have to do this manually once, and then configure the ROOM ID on run_docker.sh script.

Configure this files to your needs:

./conf/config.py     # for username/password configuration
./conf/auth_tokens   # authentication tokens of the HTTP API (just simple strings)
./bin/bot            # a working script in curl to access the api and send a message
./run_docker.sh      # run container with 'docker run', configure to your needs

(Optional) Install the bin/bot by using a hardlink. Choose whatever path you want.

ln -sf $(realpath bin/bot) /usr/local/bin/mtx-alert

Run the container!

./run_docker.sh

Enjoy!

``bash

Examples:

echo 'It works!' | ./bin/bot echo 'This looks better, isnt it?' | /usr/local/bin/mtx-alert ./bin/bot "this is the message" /usr/local/bin/mtx-alert "this is another message"

Test API connection with (returns "TEST_OK")

echo test | ./bin/bot