2024-04-03 19:41:36 -06:00
|
|
|
# matrix-room-exporter
|
|
|
|
|
2024-04-03 22:57:54 -06:00
|
|
|
_Export a Matrix a room._
|
|
|
|
|
2024-04-03 23:07:42 -06:00
|
|
|
A quick-n-dirty bot that exports a Matrix room and uploads the archive to a Cloudflare R2 bucket for the room to
|
|
|
|
download.
|
2024-04-03 22:57:54 -06:00
|
|
|
|
|
|
|
### Install
|
|
|
|
|
|
|
|
1. `pip install -r requirements.txt`
|
|
|
|
2. `cp config.yml.sample config.yml`
|
|
|
|
3. [Create a Cloudflare R2 bucket](https://developers.cloudflare.com/r2/get-started/#2-create-a-bucket).
|
|
|
|
4. Enable [public access](https://developers.cloudflare.com/r2/buckets/public-buckets/).
|
|
|
|
5. Create an [access key](https://developers.cloudflare.com/r2/api/s3/tokens/).
|
2024-04-04 00:21:05 -06:00
|
|
|
6. Configure `config.yml` with your R2 credentials.
|
|
|
|
7. Set up an [object lifecycle rule](https://developers.cloudflare.com/r2/buckets/object-lifecycles/) to auto-delete old
|
2024-04-03 22:57:54 -06:00
|
|
|
exports from your bucket. 24 hours is a good choice.
|
|
|
|
8. Set up a [matrix-org/pantalaimon](https://github.com/matrix-org/pantalaimon) for encrypted sync.
|
|
|
|
9. Create a new Matrix user and configure it in `config.yml`.
|
|
|
|
10. Start the bot with `python3 main.py`
|
|
|
|
|
|
|
|
### Use
|
|
|
|
|
|
|
|
1. Invite the new bot to the room you want to export.
|
|
|
|
2. Send the message `!export` to start the export process.
|
|
|
|
|
2024-04-03 23:07:42 -06:00
|
|
|
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
|
2024-04-04 00:21:05 -06:00
|
|
|
able to export anything earlier than when it joined.able to export anything earlier than when it joined.
|