update readme

This commit is contained in:
saces 2026-02-10 14:49:35 +01:00
parent b488100ac1
commit 171a5edc72
2 changed files with 33 additions and 37 deletions

View file

@ -1,11 +1,11 @@
monorepos to have the right versions together
libmxclient - golang matrix client library
pygomx - python binding
pygomx-module - python binding package
smal - python matrix lib
run the demobot:
just run the demobot (docker):
docker compose build demobot
docker compose run --rm demobot smalsetup <matrixid>
@ -13,47 +13,39 @@ docker compose up -d demobot
the bot follows each invite (autojoin) and have two commands:
!stop - graceful shutdown
!echo - reply
!echo [text] - in a DM the bot responds with 'text',
in regular rooms it is a reply.
install (venv):
develop:
(create and activate a venv)
for installing/editing things it is run as root inside the container.
cd pygomx-module
pip install -r requirements.txt
make install
(run 'make clean' to remove any generated)
docker compose build dev
docker compose run --rm dev /bin/bash
cd ../smal
pip install [-e] .
usage:
pip install -e .
mxdiscover <mxid>
cd into an empty dir (you might create one)
smalsetup <matrixid>
this command creates a credentials file (.mxpass) in the current dir.
autopickup by all tools & bots that requires credentials, no further configuration required
---
screenshot:
~/p/m/pygomx (main|✚1) $ docker compose run --rm dev /bin/bash
root@7c2a56098d3c:/smal#
Container pygomx-dev-run-121767d34a7a Creating
Container pygomx-dev-run-121767d34a7a Created
root@b2f35adb64b0:/smal# pip install -e .
Obtaining file:///smal
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: smal
Building editable for smal (pyproject.toml) ... done
Created wheel for smal: filename=smal-0.0.1-0.editable-py3-none-any.whl size=3096 sha256=9291e8de463dc781d713da5751bd16422769ba30c47760c7b5f27361a3752e77
Stored in directory: /tmp/pip-ephem-wheel-cache-qjjjkcin/wheels/1f/23/eb/fa46f9ff6c1c46feaa27e5ffad7cb966e7aee46d5794e2d15f
Successfully built smal
Installing collected packages: smal
Successfully installed smal-0.0.1
root@b2f35adb64b0:/smal# mxdiscover matrix.org
try to discover from: b'matrix.org'
Attempt to discover 'matrix.org'
b'{"m.homeserver":{"base_url":"https://matrix-client.matrix.org"},"m.identity_server":{"base_url":"https://vector.im"}}'
root@b2f35adb64b0:/smal#
commands:
mxdiscover
mxwhoami
mxtoken
mxaccountinfo
mxclearaccount
mxserverinfo
demobot
docker compose build demobot
docker compose run --rm --user $(id -u):$(id -g) -v /local/path/to/data/dir:/demobot demobot smalsetup
docker compose run --rm --user $(id -u):$(id -g) -v /local/path/to/data/dir:/demobot demobot demobot
matrix room:
#pygomx:matrix.org
https://matrix.to/#/#pygomx:matrix.org

View file

@ -3,6 +3,10 @@ pygomx-module
python package with the pygomx binaries
install reqiurements:
pip install -e requirements.txt
build wheel: