xmpp/README.md

41 líneas
1,5 KiB
Markdown
Original Vista normal Històric

# xmpp Akkoma bot
2022-08-09 08:14:36 +02:00
Bot to manage a xmpp ejabberd node from an Akkoma instance, by posting keywords to it.
2022-08-08 23:03:54 +02:00
The bot only listen keywords from your Akkoma instance local users. They can register themselves to your ejabberd xmpp server, unregister or also get your xmpp node stats.
2022-08-09 08:14:36 +02:00
The keywords that they can issue against the bot are the following:
@your_bot register
2022-08-08 22:49:09 +02:00
@your_bot unregister
@your_bot stats
2022-08-09 11:20:16 +02:00
The bot will process any of the above keywords thanks to the wrapper for ejabberd API (`ejabberdapi.py`, included) and the wrapper for Akkoma API (`akkoma.py`, also included) but, first time you run `python xmpp.py`, it will ask you for the needed parameters like:
- api_base_url: http://127.0.0.1:5280
- local_vhost: your local ejabberd vhost
- admin_account: the ejabberd admin account, in exemple admin@ejabberd.server
- admin_pass: ejabberd admin account password
- Akkoma hostname: in ex. akkoma.host
- bot's replies language (ca or en)
2022-08-09 08:14:36 +02:00
# Requirements
- Akkoma instance
- xmpp ejabberd node with admin privileges
Before running `python xmpp.py`:
1. git clone https://git.mastodont.cat/spla/xmpp.git target_dir.
2. `cd target_dir`
3. create the Python Virtual Environment with `python3.x -m venv .`
4. activate it with `source bin/activate`
5. run `pip install -r requirements.txt` to install required libraries.
6. set up your contrab to run `python xmpp.py` every minute.
Enjoy!
2022-08-09 11:18:48 +02:00
* 9.8.2022 New feature! Added lang support! bot replies's lang is configured during setup. Only `ca` or `en` are actually supported.
2022-07-24 21:14:42 +02:00