2 Replies Latest reply on Feb 3, 2012 9:36 AM by kborchers

    Hubot for #aerogear

    kborchers

      After the meeting this past Tuesday, I thought it might be useful to create a Hubot for #aerogear to have around as a helper when providing support to or just conversing with people visiting that channel. It can do a lot of fun things like show images of pugs or give you a Google map but what I envision is something like bot-t who hangs out in #jquery. You can say things like "?ajax" in #jquery and bot-t will reply with "jQuery.ajax(url, [settings]): Perform an asynchronous HTTP (Ajax) request. http://api.jquery.com/jQuery.ajax/" so I could imagine connecting this bot to different API references or storing different commands to help answer questions and facilitate conversation.

       

      The bot is up and running as aerobot in #aerogear right now so feel free to throw commands at it. It will be up and down as I make changes and improve it but I would love any feedback you guys have on if it's even necessary or things you would like to see it do.

       

      A few specifics include:

      • Written in CoffeeScript (I'm still learning!)
      • Runs on Node.js
      • Hosted on my personal Heroku account (we would probably want to change this if we keep it around permenantly)
      • The nick aerobot is not registered because again I didn't want to do anything permenant until I get feedback

       

      Thoughts?

        • 1. Re: Hubot for #aerogear
          jbalunas

          I think this is something that would be interesting to think about as we move forward, but I'm not sure of the priority for right now.  What commands are currently working?

           

          The biggest thing that we're thinking of getting set up is a meetbot that helps with meetings notes, and action items.  There is also jbossbot that provides some jira integration ( adds links and summary when referencing AEROGEAR-XXX), and also github integration for when commits and pull requests come in.

          • 2. Re: Hubot for #aerogear
            kborchers

            I would agree that this is not high priority. This would be more of a convenience bot that can grab info for us. It has a number of available functions out of the box plus a couple that I have modified or added so far. A few commands of note that are available now include:

            • .g <phrase> -- Google the <phrase> and return the title and link for the first result (ex - .g aerogear project)
            • .tweet <twitter handle> -- Return the last tweet posted by this twitter user (ex - .tweet k_borchers)
            • <link to a tweet> -- Shows the twitter user's name and the content of the tweet referenced (ex - https://twitter.com/#!/tech4j/status/164766195663388672)
            • ?<phrase> [@ user] -- Pull a stored "factoid" from the database. User "@ user" will direct the response at the specified user (ex - ?aerogear  or  ?aerogear @ kborchers)
              • Currently, since this bot is being hosted on my free Heroku account, the Redis store where the facts are kept is not persistent so if the bot is restarted, any stored facts are lost
              • To store a new item you use "aerobot: <phrase> is <factoid>" and to remove one you use "aerobot: forget <phrase>
              • This script could be modified to store the data elsewhere that is persistent or could be changed to search different API's, etc. I think it would be best to set up other scripts for searching API's and keep this one for storing helpful phrases, links, etc.

             

            This bot could be made to do pretty much anything we want. The scripts are written in CoffeeScript which I am still learning but is pretty easy to pick up.