Skip to content

Commit ac94d95

Browse files
committed
Third pass at README update
1 parent 0631220 commit ac94d95

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

README.md

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,22 @@ required for the bot to function. Finally, you must ensure that you have
6565
subscribed the bot users to the list of events it will need to receive in order
6666
to operate.
6767

68-
1) First, navigate to `api.slack.com/apps` and create a new slack app. Give it
68+
1. First, navigate to `api.slack.com/apps` and create a new slack app. Give it
6969
a name and select the workspace that it will serve, and then click create.
7070

71-
2) Enable socket mode by clicking on the menu of the same name and then
71+
2. Enable socket mode by clicking on the menu of the same name and then
7272
clicking on the toggle labelled "Enable Socket Mode". You'll be prompted to
7373
create an App Level Token which you must do next.
7474

75-
2) App Level Token
75+
3. App Level Token
7676

7777
This token is used by the bot to access the websocket event feed in version 3
7878
of the Slack API. The toggle you enabled in the previous step, "Enable Socket
7979
Mode", is what turns on the event feed. Assuming you've not already created an
8080
App Level Token you'll now be prompted to do so. Place it into the config file
8181
under the entry `app_key`.
8282

83-
3) Bot User Token
83+
4. Bot User Token
8484

8585
This token is used by the bot to interact with the workspace and users via
8686
Slack's conversations API. In order to create this token you must first
@@ -101,7 +101,6 @@ chat:write
101101
chat:write.customize
102102
chat:write.public
103103
dnd:read
104-
emoji:read
105104
groups:history
106105
groups:read
107106
groups:write
@@ -113,8 +112,6 @@ links:write
113112
mpim:history
114113
mpim:read
115114
mpim:write
116-
pins:read
117-
pins:write
118115
reactions:read
119116
reactions:write
120117
reminders:list
@@ -131,7 +128,7 @@ Access Token" (begins with `xoxb`) into the config file under the entry
131128
display name using the menu on the left labelled "Basic Information", if you
132129
want.
133130

134-
4) Event subscription
131+
5. Event subscription
135132

136133
NOTE: Make sure you toggle "Enable Socket" (step 2) before attempting this!
137134

@@ -146,48 +143,47 @@ fine to select all of the event subscriptions here if you want to be on the simp
146143
```
147144
app_mention
148145
app_mentions:read
146+
channels:history
149147
emoji_changed
150148
emoji:read
149+
groups:history
150+
im:history
151151
link_shared
152152
links:read
153153
message.channels
154-
channels:history
155-
message.groups
156-
groups:history
157154
message.im
158-
im:history
155+
message.groups
159156
message.mpim
160157
mpim:history
161158
reaction_added
162159
reactions:read
163160
reaction_removed
164-
reactions:read
165161
```
166162

167163

168164
## Installation
169165

170-
1. Copy `config/config.json.template` to `config/config.json`
171-
2. Fill the APP and API token names in the config.json file.
172-
3. Add your user id (slack id, not the username) to `admin_users` group in `config/config.json`
166+
1. Copy _config/config.json.template_ to _config/config.json_
167+
2. Fill the APP and API token names in the _config.json_ file.
168+
3. Add your user id (slack id, not the username) to `admin_users` group in _config/config.json_
173169
4. If you want to use the wolfram alpha api, register a valid app id on http://products.wolframalpha.com/api/ and set `wolfram_app_id` in `config/config.json`
174-
5. Copy `intro_msg.template` to `intro_msg` and set a proper introduction message, which can be shown with `!intro`
170+
5. Copy _intro_msg.template_ to _intro_msg_ and set a proper introduction message, which can be shown with `!intro`
175171
6. `docker build -t ota-challenge-bot .`
176172
7. `docker run -it --rm --name live-ota-challenge-bot ota-challenge-bot`
177173

178174

179175
## Development
180176

181-
1. Copy `config/config.json.template` to `config/config.json`
182-
2. Fill the API token and bot name in the config.json file.
177+
1. Copy _config/config.json.template_ to _config/config.json_
178+
2. Fill the API token and bot name in the _config.json_ file.
183179
3. Create a virtual env: `python3 -m venv .venv`
184180
4. Enter the virtual env: `source .venv/bin/activate`
185181
5. Install requirements: `pip install -r requirements.txt`
186182

187183

188184
## Using git support for uploading solve updates
189185

190-
1. Copy `config/config_solvetracker.json.template` to `config/config_solvetracker.json`.
186+
1. Copy _config/config_solvetracker.json.template_ to _config/config_solvetracker.json_.
191187
2. Configure the git account, the local repo and the remote path, which should be used to access your git repository.
192188

193189
Example:
@@ -202,20 +198,20 @@ Example:
202198
}
203199
```
204200

205-
Alternatively, you may decide to omit the "git_repopass" entry. In such an event (or if the entry is left blank) then the handler will attempt to push to the configured "git_remoteuri" using the `git` protocol, including using any SSH identities you may have configured.
201+
Alternatively, you may decide to omit the `git_repopass` entry. In such an event (or if the entry is left blank) then the handler will attempt to push to the configured "git_remoteuri" using the `git` protocol, including using any SSH identities you may have configured.
206202
Note: If you configure the solvetracker this way, you need to make sure you are using an SSH identity without a passphrase.
207203

208204
3. Update the templates in `templates` according to your preferences (or go with the default ones).
209-
4. Make sure that there's a `_posts` and `_stats` folder in your git repository.
205+
4. Make sure that there's a __posts_ and __stats_ folder in your git repository.
210206
5. You should be good to go now and git support should be active on the next startup. You can now use the `postsolves` command to push blog posts with the current solve status to git.
211207

212208

213209
## Using Link saver
214210

215211
1. Setup a github repo with jekyll and staticman (e.g. https://github.com/ujjwal96/links).
216-
2. Copy `config/config_savelink.json.template` to `config/config_savelink.json`.
212+
2. Copy _config/config_savelink.json.template_ to _config/config_savelink.json_.
217213
3. Configure the git repo and branch to be used.
218-
4. Add the decrypted staticman-token used in `staticman.yml` in the config.
214+
4. Add the decrypted staticman-token used in _staticman.yml_ in the config.
219215
5. Add a link to your repo, so people can look it up via `showlinkurl`
220216

221217
Example:
@@ -231,7 +227,7 @@ Example:
231227

232228
## Archive reminder
233229

234-
To enable archive reminders set an offset (in hours) in `config/config.json` for `archive_ctf_reminder_offset`. Clear or remove the setting to disable reminder handling.
230+
To enable archive reminders set an offset (in hours) in _config/config.json_ for `archive_ctf_reminder_offset`. Clear or remove the setting to disable reminder handling.
235231

236232
If active, the bot will create a reminder for every bot admin on `!endctf` to inform him, when the ctf was finished for the specified time and it should be archived.
237233

@@ -245,7 +241,7 @@ Example (for being reminded one week after the ctf has finished):
245241

246242
## Log command deletion
247243

248-
To enable logging of deleting messages containing specific keywords, set `delete_watch_keywords` in `config/config.json` to a comma separated list of keywords.
244+
To enable logging of deleting messages containing specific keywords, set `delete_watch_keywords` in _config/config.json_ to a comma separated list of keywords.
249245
Clear or remove the setting to disable deletion logging.
250246

251247
Example

0 commit comments

Comments
 (0)