Support #169
Add a bot or two to the IRC channel
| Status: | Assigned | Start: | 05/26/2010 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | Website | |||
| Target version: | - | |||
Description
See some thoughts in this ML thread.
Extracted from it:
- Log channel to some persistent storage via a bot
- View it on the Web
- irclogger is a nice Sinatra based Web front-end, though it doesn’t seem to have any actual logger bot involved — reads from a MySQL database. May be easy enough to reverse engineer its DB portion to figure out what a logger would need to write (and, of course, fork + hack to not use MySQL…)
- Brian Rosner’s django logger – his about link is broken so it’s unclear if he’s got a logger bot or not. Ping him if interested.
- TG logger page — down for me just now when I looked =/
Additional log-related features drawn up on the fly / based on using them elsewhere:
- Search
- Stats (useless but fun)
- Ability to link to specific lines or ranges/groups of lines (excellent for referencing specific discussions)
More thoughts from myself, mostly based on past experience as a user on other peoples' bots (without reviewing the above thread, so you should still reread it):
Redmine ticket linking- Redmine (and/or GitHub?) changeset/branch/file linking
- Redmine ticket search (could lead to flooding; how to find “the” ticket I'm thinking of? /msg user, have them pick one, then state that one in channel? just grab
results[0]? be lazy and link to search results page?) - Redmine ticket creation. Something like
!ticket "subject" "description"which then spits back the resulting new ticket URL - Sphinx docs searches, e.g.
!docs interactivitymakes the bot return either search query for (or if there’s only one hit, the resulting page for) that search term on the Sphinx docs - Temporal intelligence, i.e. for a given response stimuli, don’t re-respond to it more than X times in Y period. For example, if I say “ticket #40” a few times in a row in the same 5 minute span, the bot should not parrot it each time.
- Possibly be spatial instead of temporal, i.e. number of lines apart — that’s the real deal, I don’t want more than one reply per screen of conversation. While that height is different for everyone, find some sensible average like…12 or 20 or something…and go with it.
May be best to have one bot for dedicated logging, and use something premade (see e.g. phenny, phenny_osu) and have the other be a custom one responding to commands and/or stimuli.
(Note for searches: the bot’s name is Ghostwheel in-channel. Its source code is mirrored on GitHub.)
Best-of-breed Ruby libraries (based on quick research, haven’t investigated their docs myself yet)
- Autumn – pretty heavy, basically “Rails for IRC” — would rather not.
- Cinch – looks pretty featureful while still easy to use/hack
- Isaac — great looking API but few docs
- RBot — bunch of features I don’t care for, few docs, set up to be a general bot you don’t code but config on the fly — no thanks.
Result: try Isaac first, go to Cinch if Isaac proves difficult to understand.
Also, this RBot plugin handles Redmine integration. Probably not a good enough reason to use RBot but good for ideas/cribbing.
(Looked for Python bot libs too but didn’t find any that I liked.)
Related issues
| related to Support #222 | Look into upgrading Redmine | New | 09/01/2010 | ||
| duplicated by Bug #207 | Ghostwheel needs | Duplicate | 08/04/2010 |
History
Updated by Jeff Forcier 54 days ago
Using Isaac to good effect so far; have intelligent Redmine ticket autoreply working as the first feature. Keeping the code in its own repo elsewhere since it’s Ruby and not really something that belongs in the Fabric repo in any case.
Updated by Jeff Forcier 54 days ago
Ticket creation will be a bit tougher since our Redmine is 0.8 based and has no REST API. Options offhand include:
- More Web scraping stuff, except this time forging auth tokens and doing a POST.
- Enabling ticket creation via email (which is in 0.8) and using that (not sure I want to open up that can of worms though, think spam/security/whatever?)
- Merge the REST API code in from 0.9 (probably a lot of work; but also possibly useful if I assume I want to keep my custom branch instead of just upgrading wholesale to 0.9…different discussion, that)
- Write my own tiny REST WS via eg Sinatra/whatever, running alongside Redmine and interfacing with it at the Ruby library level (which I think is how the email gateway works)
Also available in: Atom