Giter Club home page Giter Club logo

flatbot's Introduction

Flatbot

This is a version of GitHub's Campfire bot, hubot, customized for Flat World Knowledge.

This version is designed to be deployed on Heroku. Flatbot is on heroku at http://flatbot.herokuapp.com/ but you won't find any web presence.

Testing Flatbot Locally

You can test flatbot by running the following. Note that we use the Flowdock adapter.

% bin/hubot -a flowdock -n flatbot

You'll see some start up output about where your scripts come from and a prompt.

[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading adapter shell
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/scripts
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/src/scripts
Hubot>

Then you can interact with flatbot by typing flatbot help.

Hubot> flatbot help

Hubot> animate me <query> - The same thing as `image me`, except adds a few
convert me <expression> to <units> - Convert expression to given units.
help - Displays all of the help commands that Hubot knows about.
...

Scripting

Take a look at the scripts in the ./scripts folder for examples. Delete any scripts you think are useless or boring. Add whatever functionality you want flatbot to have. Read up on what you can do with hubot in the Scripting Guide.

Redis Persistence

If you are going to use the redis-brain.coffee script from hubot-scripts (strongly suggested), you will need to add the Redis to Go addon on Heroku which requires a verified account or you can create an account at Redis to Go and manually set the REDISTOGO_URL variable.

% heroku config:add REDISTOGO_URL="..."

If you don't require any persistence feel free to remove the redis-brain.coffee from hubot-scripts.json and you don't need to worry about redis at all.

We use the persistence with Flatbot (why not?), so you'll need to run a redis-server locally if you want to test locally.

hubot-scripts

There will inevitably be functionality that everyone will want. Instead of adding it to hubot itself, you can submit pull requests to hubot-scripts.

To enable scripts from the hubot-scripts package, add the script name with extension as a double quoted string to the hubot-scripts.json file in this repo.

external-scripts

Tired of waiting for your script to be merged into hubot-scripts? Want to maintain the repository and package yourself? Then this added functionality maybe for you!

Hubot is now able to load scripts from third-party npm packages! To enable this functionality you can follow the following steps.

  1. Add the packages as dependencies into your package.json
  2. npm install to make sure those packages are installed

To enable third-party scripts that you've added you will need to add the package name as a double quoted string to the external-scripts.json file in this repo.

Deployment

You'll need to have access to the flatbot heroku instance, and add it as a remote:

% heroku git:remote -a flatbot

Then:

% git push heroku master
% heroku ps:scale web=1

If you run into any problems, checkout Heroku's docs.

More detailed documentation can be found on the deploying hubot onto Heroku wiki page.

Restart the bot

You may want to get comfortable with heroku logs and heroku restart if you're having issues.

flatbot's People

Contributors

slabgorb avatar andyroth avatar drosile avatar

Watchers

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