Cyberes 030a04e989 | ||
---|---|---|
exporter | ||
.gitignore | ||
LICENSE | ||
README.md | ||
config.yml.sample | ||
main.py | ||
matrix-room-exporter.service | ||
requirements.txt |
README.md
matrix-room-exporter
Export a Matrix a room.
A quick-n-dirty bot that exports a Matrix room and uploads the archive to a Cloudflare R2 bucket for the room to download.
Install
pip install -r requirements.txt
sudo apt install redis-server && sudo systemctl enable --now redis-server
cp config.yml.sample config.yml
- Create a Cloudflare R2 bucket.
- Enable public access.
- Create an access key.
- Configure
config.yml
with your R2 credentials. - Set up an object lifecycle rule to auto-delete old exports from your bucket. 24 hours is a good choice.
- Set up a matrix-org/pantalaimon for encrypted sync.
- Create a new Matrix user and configure it in
config.yml
- Add your username to
allowed_to_export
inconfig.yml
- Start the bot with
python3 main.py
Use
- Invite the new bot to the room you want to export.
- Send the message
!export
to start the export process.
The bot will upload the exported room to your R2 bucket and share the link with the room.
Remember, if your room is encrypted and new members can't see old history prior to their joining then the bot won't be able to export anything earlier than when it joined.