Hubot is an open source chatbot created by GitHub. It’s used by various companies, groups, and other techie types, to control systems, gather information, and put moustaches on things – all via chat interfaces. Hubot can be adapted to work via IM, GTalk, Twitter, IRC, and other platforms. ‘Chat Ops‘ is a growing trends, and because it is simple, and quite charming, I think it may stick around.
I’ve just finished an epic few days at the sixth .Astronomy event. This is my own conference series, and I’m gleefully exhausted from several days of talking, making, and hosting my favourite event of the year. More on that in a later post. During the .Astronomy 6 Hack Day (sponsored by GitHub in fact!) I worked on making an astronomical Hubot – which I’ve called ‘botastro‘ in honor of the #dotastro hashtag from .Astronomy itself.
@botastro exists only on Twitter (for now) and to interact you just tweet it. For example if you tweet
then @botastro will reply
You can can send multiple messages to the bot, but I have a growing list of other ideas too. Currently you can say things like:
- @botastro sunrise Chicago
- @botastro apod me
- @botastro galaxify hello world
- @botastro fun fact
- @botastro moonphase
- @botastro tell me about Jupiter
- @botastro show me Perseus
- @botastro gif dog
- @botastro exoplanet me
and asking it to ‘exoplanet me’ gives you an exoplanet from the catalogue (thanks to Dan Foreman-Mackey and Geert Berensten). The results you get when asking it to show you something or tell you about something are sourced from Stuart Lowe‘s lookUP service, and the space gifs come from Giphy.
These may be silly and fun, but more complex actions become possible – especially once I get a bit more used to Coffeescipt, the language this bot is written in.
@botastro is open source (on GitHub, naturally) and I’d love it if people wanted to add functionality. If you want to try, you’ll need to fork the repo, create a new script, and submit a pull request. Hubot is outlined here, and you can look at botastro’s other scripts for examples too.