|
@@ -5,24 +5,37 @@ A bot for automagically sending messages to Owncast chat, at specified intervals
|
|
|
|
|
|
### Create a config.py
|
|
|
```
|
|
|
-owncast_url = 'https://<url>' # The URL of your Owncast server
|
|
|
-logfile = '' # /full/path/to/logfile.txt
|
|
|
-auth_bearer = '' # The API access token for your nagbot. You'll need to create one in the Owncast admin panel.
|
|
|
+owncast_url = '<url>' # The URL of your Owncast server
|
|
|
+auth_bearer = '' # The API access token for your nagbot. You'll need to create one in the Owncast admin panel.
|
|
|
+logfile = 'nagbot.log' # Logfile
|
|
|
nags = ['this is a message', 'this is another message'] # A list of messages to be cycled through
|
|
|
interval = # The interval, in seconds, between messages. It's an integer, so no quotes.
|
|
|
```
|
|
|
|
|
|
### Setup
|
|
|
|
|
|
-Create your venv, we'll call it ".venv", and activate it.
|
|
|
+Create your venv, and activate it.
|
|
|
|
|
|
+```bash
|
|
|
+python3 -m venv env
|
|
|
+source env/bin/activate
|
|
|
```
|
|
|
+
|
|
|
+Upgrade pip and install the requests module.
|
|
|
+
|
|
|
+```bash
|
|
|
pip install --upgrade pip
|
|
|
pip install requests
|
|
|
```
|
|
|
|
|
|
-### Run with:
|
|
|
+Deactivate your venv.
|
|
|
|
|
|
+```bash
|
|
|
+deactivate
|
|
|
```
|
|
|
-.venv/bin/python nagbot.py
|
|
|
+
|
|
|
+### Run with:
|
|
|
+
|
|
|
+```bash
|
|
|
+env/bin/python nagbot.py
|
|
|
```
|