Skip to content

Commit 442623a

Browse files
committed
readme: clarify configuration
1 parent 108e971 commit 442623a

1 file changed

Lines changed: 14 additions & 18 deletions

File tree

README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cp .env.sample .env
1616
```
1717

1818
By default, hackbot will run with all the plugins in the `scripts/`
19-
directory. If you only want to test one plugin, move all but your script to
19+
directory. If you only want to test one plugin, move all other plugins to
2020
`disabled_scripts/`.
2121

2222
```bash
@@ -25,6 +25,7 @@ mv disabled_scripts/my_plugin.js scripts/
2525
```
2626

2727
If your plugin requires environment variables, be sure to put them in `.env`.
28+
See [Configuration](#configuration) for more details.
2829

2930
```bash
3031
vi .env
@@ -52,27 +53,22 @@ hackbot> PONG
5253

5354
## Configuration
5455

55-
Most of the scripts in `scripts/` use [hubot-conf][hubot-conf]
56-
to access configuration values from the HackMIT Slack. That means
57-
that in order to run them locally, you need to copy them from
58-
Slack into your enviroment variables.
56+
Most of the plugins in `scripts/` use [hubot-conf][hubot-conf] to access
57+
configuration values from the HackMIT Slack. That means that in order to run
58+
them locally, you need to copy some configuration values from Slack into your
59+
`.env`.
5960

60-
To do this, in Slack #botspam type `hackbot conf dump`. Find the
61-
variables you need, and copy them into a `.env` file.
61+
To do this, in Slack #botspam type `hackbot conf dump`. Find the variables
62+
you need, and copy them into `.env`.
6263

6364
Be sure to follow [hubot-conf][hubot-conf] convention, mapping
64-
`package.name.property.name` from Slack to
65-
`HUBOT_PACKAGE_NAME_PROPERTY_NAME` in `.env`.
65+
`package.name.property.name` from Slack to `HUBOT_PACKAGE_NAME_PROPERTY_NAME`
66+
in `.env`.
6667

67-
As an example, if I want the property `example.hello = "hello"`, I
68-
would write the line `export HUBOT_EXAMPLE_HELLO="hello"` in `.env`.
69-
70-
To minimize work, you can move the scripts you don't need to use
71-
into `disabled_scripts/`, so you only need to copy configuration
72-
values for the scripts you're changing.
73-
74-
Remember to `source .env` and restart hackbot with `npm run dev`
75-
after you make a change!
68+
| Source | Key name | Example usage |
69+
| -------------------- | --------------------- | ------------------------------------ |
70+
| Slack | `example.hello` | `example.hello = "hello"` |
71+
| Environment variable | `HUBOT_EXAMPLE_HELLO` | `export HUBOT_EXAMPLE_HELLO="hello"` |
7672

7773
## Examples
7874

0 commit comments

Comments
 (0)