Giter VIP home page Giter VIP logo

snobot's Introduction

SNObot

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!

To be done

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

Running SNObot Locally

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.
...

Configuration

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.

snobot's People

Contributors

rorydavidson avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.