SNObot is a chat bot built on the Hubot framework. It was initially generated by generator-hubot.
It's intention is to reply to requests to retrieve information about SNOMED CT concepts from the most recent release of the International Edition.
This README is intended to help get you started. Definitely update and improve to talk about your own instance, how to use and deploy, what functionality is available, etc!
Currently, it just sends back a simple text response. Improvements incoming:
- to make it send back a formatted response to hipchat
- use Slack adapter
- anything else I can think of
You can test SNObot by running the following, however some plugins will not behave as expected unless the environment variables they rely upon have been set.
You can start SNObot locally by running:
% bin/hubot --adapter hipchat
You'll see some start up output and a prompt:
[Sat Oct 01 2016 12:38:27 GMT+0000 (GMT)] INFO Using default redis on localhost:6379
SNObot>
Then you can interact with SNOBot by typing SNObot help
.
SNObot> SNObot help
/concept <search term> - search SNOMED CT for a given term
/sctid <id> - return the term for the give SNOMED CT identifier
SNObot help - Displays all of the help commands that SNObot knows about.
...
SNObot requires environment variables to be set as a simple form of configuration.
The script has a commented header which contains a "Configuration" section that explains which values it requires to be placed in which variable. When you have lots of scripts installed this process can be quite labour intensive. The following shell command can be used as a stop gap until an easier way to do this has been implemented.
grep -o 'hubot-[a-z0-9_-]\+' external-scripts.json | \
xargs -n1 -I {} sh -c 'sed -n "/^# Configuration/,/^#$/ s/^/{} /p" \
$(find node_modules/{}/ -name "*.coffee")' | \
awk -F '#' '{ printf "%-25s %s\n", $1, $2 }'
How to set environment variables will be specific to your operating system. Rather than recreate the various methods and best practices in achieving this, it's suggested that you search for a dedicated guide focused on your OS.