forked from n/quotes-bot-python
docs, sample config
This commit is contained in:
parent
f94a97b0f2
commit
794549b37c
2 changed files with 40 additions and 1 deletions
32
README.md
32
README.md
|
@ -1,3 +1,35 @@
|
||||||
# quotes-bot-python
|
# quotes-bot-python
|
||||||
|
|
||||||
WIP rewrite of n/quotes-bot in Python with https://codeberg.org/imbev/simplematrixbotlib.
|
WIP rewrite of n/quotes-bot in Python with https://codeberg.org/imbev/simplematrixbotlib.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
First, make and activate a venv. There are plenty of guides online, however it usually goes like this:
|
||||||
|
```sh
|
||||||
|
python3 -m virtualenv venv && source venv/bin/activate.fish
|
||||||
|
```
|
||||||
|
If you use bash, you can replace `source venv/bin/activate.fish` with just `source venv/bin/activate`.
|
||||||
|
|
||||||
|
#### Dependencies
|
||||||
|
|
||||||
|
This bot depends on `simplematrixbotlib`, which can be installed in your venv like this:
|
||||||
|
```sh
|
||||||
|
pip install simplematrixbotlib
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Configuring
|
||||||
|
|
||||||
|
> TODO: write docs about the config file
|
||||||
|
|
||||||
|
First, copy the sample config:
|
||||||
|
```sh
|
||||||
|
cp config.sample.json config.json
|
||||||
|
```
|
||||||
|
Then edit it:
|
||||||
|
```sh
|
||||||
|
$EDITOR config.json
|
||||||
|
```
|
||||||
|
You should be good to go! To run it, run this in the venv:
|
||||||
|
```sh
|
||||||
|
python bot.py
|
||||||
|
```
|
||||||
|
|
7
config.sample.json
Normal file
7
config.sample.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"matrix": {
|
||||||
|
"server": "https://example.com",
|
||||||
|
"userid": "@quotes:example.com",
|
||||||
|
"password": "hunter2"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue