soft fork of https://github.com/maubot/maubot, but for building local containers
Find a file
2019-03-27 14:49:51 +01:00
docker Switch to a hacky custom router for plugin web apps 2019-03-06 23:16:22 +02:00
examples Update hello world example and add config example 2019-01-07 08:14:29 +02:00
img Add usage documentation 2019-03-27 14:49:51 +01:00
maubot Fix plugin webapp URL cloning 2019-03-08 01:54:28 +02:00
.editorconfig Update management spec 2018-10-31 22:27:59 +02:00
.gitignore Finish plugin API and add basic login system 2018-10-31 02:03:38 +02:00
Dockerfile Fix blank module handling in mbc build and bump alpine base in dockerfile 2019-02-13 19:40:21 +02:00
example-config.yaml Switch to a hacky custom router for plugin web apps 2019-03-06 23:16:22 +02:00
LICENSE Initial commit 2018-06-14 01:41:05 +03:00
README.md Add usage documentation 2019-03-27 14:49:51 +01:00
requirements.txt Add more stuff 2018-12-13 18:15:24 +02:00
setup.py Pass public URL of webapp to plugins 2019-03-06 22:35:51 +02:00

maubot

A plugin-based Matrix bot system written in Python.

Wiki

Usage

In order to create a bot from a basic configuration, clone this repository. Cloning is only required to reuse some necessary configuration files. It is not necessary to clone the repository in order to install maubot. This can be done via pip install maubot. From now on we refer to the directory where this repository has been cloned to as maubot.

The new bot will have its own directory, which can be created anywhere on the local filesystem with mkdir <bot_dir> where <bot_dir> is a name of your choice.

Copy maubot/example-config.yaml to <bot_dir>.

Keep file example-config.yaml and copy it to <bot_dir>/config.yaml. At this point <bot_dir> will contain both example-config.yaml and config.yaml. In the same directory <bot_dir> create three directories that will be used by the bot later. Type

cd <bot_dir>

mkdir logs plugins trash

Before running the bot, edit config.yaml in all its sections. In particular in section plugin_directories make sure that the bot will use the directories created before (./trash and ./plugins).

Section server is self explanatory in its default. Make sure it looks like below

server:
    # The IP and port to listen to.
    hostname: 0.0.0.0
    port: 29316

In any case, use the same port when you will point the browser later.

Section admins should be configured with the username and password that will login to the bot manager page. If username needs to login with password 1234, this section will look like below

admins:
    username: "1234"

At this point launch the bot manager. From directory <bot_dir> launch

python -m maubot

and point the browser to http://localhost:29316/_matrix/maubot/#/login

After login, it is possible to create a new bot instance (clicking the + Instances button) via the screen like the one below alt text

Management API spec

Discussion

Matrix room: #maubot:maunium.net

Plugins

  • jesaribot - A simple bot that replies with an image when you say "jesari".
  • sed - A bot to do sed-like replacements.
  • factorial - A bot to calculate unexpected factorials.
  • media - A bot that replies with the MXC URI of images you send it.
  • dice - A combined dice rolling and calculator bot.
  • karma - A user karma tracker bot.
  • xkcd - A bot to view xkcd comics.
  • echo - A bot that echoes pings and other stuff.
  • rss - A bot that posts RSS feed updates to Matrix.

Upcoming

  • dictionary - A bot to get the dictionary definitions of words.
  • poll - A simple poll bot.
  • reminder - A bot to ping you about something after a certain amount of time.
  • github - A GitHub client and webhook receiver bot.
  • wolfram - A Wolfram Alpha bot
  • gitlab - A GitLab client and webhook receiver bot.