Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 improve readme #5

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
![python](https://img.shields.io/badge/language-Python-3776AB?logo=Python)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

## Prerequisites

- `Python3` and `pip` or docker installed
- a Synapse server available with its Synapse secret
- a user having admin rights on Synapse homeserver
- [Poetry](https://python-poetry.org/) installed for development

## Configuration

And a some configurations in an `.env` file
Set the configurations in an `.env` file :

```env
HOMESERVER_URL=https://matrix.example.com
Expand All @@ -15,16 +22,7 @@ ADMIN_USERNAME=
ADMIN_PASSWORD=
```

Find `SYNAPSE_SECRET` in your homeserver configuration

And will create the users on the homeserver.

## Prerequisites

- `Python3` and `pip` installed
- a Synapse server available with its Synapse secret
- a user having admin rights on Synapse homeserver
- [Poetry](https://python-poetry.org/) installed
You can find `SYNAPSE_SECRET` in your homeserver configuration

## Install

Expand All @@ -51,12 +49,12 @@ poetry run eimis-synapse-tools --help
Or with docker image

```bash
docker run -v ./.env:/.env eimis-ans/eimis-synapse-tools --help
docker run eimisans/eimis-synapse-tools:nightly --help
```

### Import users

This python project will take as input a csv file
This tool will take as input a csv file:

```csv
| display_name | username | email |
Expand All @@ -70,10 +68,10 @@ Then the command:
poetry run eimis-synapse-tools import-users --dry-run --csv-file ./data/users.csv
```

Or with docker image
Or with docker

```bash
docker run -v ./.env:/.env -v ./data/users.csv:/data/users.csv eimis-ans/eimis-synapse-tools --dry-run --csv-file /data/users.csv
docker run -v ./.env:/.env -v ./data/users.csv:/data/users.csv eimisans/eimis-synapse-tools:nightly import-users --dry-run --csv-file /data/users.csv
```

(remove `--dry-run` to actually create the users)
Expand All @@ -85,12 +83,12 @@ Users can then go to their favorite client and click on `forgot password`.
```bash
poetry run eimis-synapse-tools setup-discoveryroom --help
poetry run eimis-synapse-tools setup-discoveryroom -r matrix.develop.eimis.incubateur.net
``````
```

Or with docker image
Or with docker

```bash
docker run -v ./.env:/.env eimis-ans/eimis-synapse-tools -r matrix.develop.eimis.incubateur.net
docker run eimisans/eimis-synapse-tools:nightly setup-discoveryroom -r matrix.develop.eimis.incubateur.net
```

## Lint
Expand All @@ -111,4 +109,4 @@ poetry run mypy . --no-namespace-packages

```bash
poetry run python -m unittest discover tests
``````
```