Improve readme setup instructions
This commit is contained in:
parent
7808b57b0b
commit
8dff69813e
24
README.md
24
README.md
|
@ -5,23 +5,41 @@ This is a zulip bot to create mostr tasks on a nostr relay.
|
||||||
1. Clone https://github.com/zulip/python-zulip-api
|
1. Clone https://github.com/zulip/python-zulip-api
|
||||||
2. Run `python3 ./tools/provision` and activate the created venv
|
2. Run `python3 ./tools/provision` and activate the created venv
|
||||||
3. Clone this repo into `python-zulip-api/zulip_bots/zulip_bots/bots/mostr`
|
3. Clone this repo into `python-zulip-api/zulip_bots/zulip_bots/bots/mostr`
|
||||||
4. Create a `mostr.conf` to specify the private key and relay for the bot to use:
|
4. Install dependencies with `pip install -r requirements.txt`
|
||||||
|
5. Create a `mostr.conf` to specify the private key and relay for the bot to use:
|
||||||
```ini
|
```ini
|
||||||
[mostr]
|
[mostr]
|
||||||
key = nsec...
|
key = nsec...
|
||||||
relay = wss://...
|
relay = wss://...
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you can test it with:
|
Now you can test it from the terminal with:
|
||||||
|
|
||||||
zulip-bot-shell mostr --bot-config-file mostr.conf
|
zulip-bot-shell mostr --bot-config-file mostr.conf
|
||||||
|
|
||||||
5. Follow the setup steps in https://zulip.com/api/running-bots and put the zuliprc file into the mostr directory
|
Above steps as sequence:
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/zulip/python-zulip-api
|
||||||
|
cd python-zulip-api
|
||||||
|
python3 ./tools/provision
|
||||||
|
source ./zulip-api-py3-venv/bin/activate
|
||||||
|
git clone https://forge.ftt.gmbh/janek/mostr-zulip-bot zulip_bots/zulip_bots/bots/mostr
|
||||||
|
cd zulip_bots/zulip_bots/bots/mostr
|
||||||
|
edit mostr.conf
|
||||||
|
pip install -r requirements.txt
|
||||||
|
zulip-bot-shell mostr --bot-config-file mostr.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
## Running on a Zulip Server
|
||||||
|
|
||||||
|
Follow the setup steps in https://zulip.com/api/running-bots and put the zuliprc file into the mostr directory
|
||||||
|
|
||||||
Now you can properly run the bot with:
|
Now you can properly run the bot with:
|
||||||
|
|
||||||
zulip-run-bot mostr --config-file zuliprc --bot-config-file mostr.conf
|
zulip-run-bot mostr --config-file zuliprc --bot-config-file mostr.conf
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
It will track context per conversation,
|
It will track context per conversation,
|
||||||
so you can DM it, ping it in topics or group chats.
|
so you can DM it, ping it in topics or group chats.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue