README.md in slack_status_tracker-0.1.0.pre vs README.md in slack_status_tracker-0.1.0.pre.1

- old
+ new

@@ -29,10 +29,11 @@ ```bash Usage: slack_status_tracker [options] -s, --start Start to track -o, --output [FILE_PATH] Output file (default slack_online_users.txt) + -i, --input [FILE_PATH] JSON file with credentials about channels --channels c1,c2,c3 Slack channels --driver [BROWSER_DRIVER] Browser Driver (default chrome) -f, --frequency [MINUTES] Time minutes frequency (default 30) -u, --username USERNAME Slack Username -p, --password PASSWORD Slack Password @@ -78,9 +79,36 @@ ``` Output: ```bash Time Online Users 2016-08-01 09:00:55 +0000 11 +``` + +### Multiple channels +In order to support multiple channels you need to pass a JSON configuration +file with the username and password for each channel. Specify the path to the +file with the proper settings. + +```json +// spec/fixtures/sample_input.json +{ + "channels": [ + { + "name": "channel 1", + "username": "user1", + "password": "secret1" + }, + { + "name": "channel 2", + "username": "user2", + "password": "secret2" + } + ] +} +``` + +```bash +slack_status_tracker -i spec/fixtures/sample_input.json ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.