Giter Site home page Giter Site logo

helga's Introduction

helga

About

Helga is a full-featured chat bot for Python 2.7 using Twisted. Helga originally started as a python fork of a perl-based IRC bot olga, but has grown considerably since then. Early versions limited to support to IRC, but now include other services like XMPP and HipChat. Full documentation can be found at http://helga.readthedocs.org.

Supported Backends

As of version 1.7.0, helga supports IRC, XMPP, and HipChat out of the box. Note, however, that helga originally started as an IRC bot, so much of the terminology will reflect that. The current status of XMPP and HipChat support is very limited and somewhat beta. In the future, helga may have a much more robust and pluggable backend system to allow connections to any number of chat services.

Contributing

Contributions are always welcomed, whether they be in the form of bug fixes, enhancements, or just bug reports. To report any issues, please create a ticket on github. For code changes, please note that any pull request will be denied a merge if the test suite fails.

If you are looking to get help with helga, join the #helgabot IRC channel on freenode.

License

Copyright (c) 2014 Shaun Duncan

Helga is open source software, dual licensed under the MIT and GPL licenses. Dual licensing was chosen for this project so that plugin authors can create plugins under their choice of license that is compatible with this project.

helga's People

Contributors

alfredodeza avatar bigjust avatar carymrobbins avatar cobbdb avatar coddingtonbear avatar crlane avatar denete avatar domenkozar avatar jantman avatar ktdreyer avatar narfman0 avatar nrb avatar shaunduncan avatar thepeopleseason avatar veatch avatar veselosky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helga's Issues

Politeness

A lot of times, I say things like "thanks helga" in an IRC channel. Helga should recognize this and respond appropriately

Refactor

helga's api is really terrible ... so maybe we should fix that and make plugins easier? This will mean a 1.0.

Command plugins have a quirk with short aliases

The way the command regex is constructed, should a short version of a command appear in aliases prior to a more verbose one, only the short is matched. For example:

@command('foo', aliases=['b', 'bar'])
def foobar(*args, **kwargs):
    pass

The command will never match 'bar', but instead will have the cmd argument as 'b' and that args argument as ['ar']. This is because the constructed regex looks something like (b|bar)(.*)

Haiku Attribution

Helga should store who added fives/sevens lines so after a haiku I can do something like helga haiku credits and she'll respond with something like "This haiku brought to you by: , , "

Expand incantation capabilities

Calling on beetlejuice is nice, but wouldn't it be more fun if we could call on Biggie Smalls?

$ biggie smalls biggie smalls biggie smalls
$ You punk ass fool.
$ biggie smalls biggie smalls biggie smalls
$ All the time, I gots to deal with this shit. I'm in hell, minding my own business. Then the next thing I know, I'm in some kids bathroom.
$ biggie smalls biggie smalls biggie smalls
$ Why'd you summon me?

Haiku blame

Butthurt about possibly being referred to a as a butthurt dictator for life?

Did someone fill all the fives with your IRC handle and you're being pinged constantly?

Who added that sevens line "Well, your momma is so fat" which was unfortunately followed by the fives line "Her ass cancer smells?"

Find out the history of any line with...

$ helga haiku blame

It "git blames" each line of the last haiku in the channel w/ nick and date.

Auto-restart

It would be handy to have a feature that would allow a running bot, upon a code change, to kill and reinstantiate itself.

Online code reloads would be even nicer, if we can figure out a mechanism to do that.

help improvements

jheady: sduncan: can i request an improvement to helga? help help should PM the user, not the channel.

Send /me on PM message

Helga responds via PM for plugin help. She should respond with something like `/me whispers to ' if she was asked on a public channel

Draw-straws plugin

I'd like helga to name someone at random from those in the room, avoiding picking someone who was recently picked by a previous invocation. She should be able to guess that (nick)_nom or (nick)_afk is the same as (nick) when thinking about who has been recently picked. She should avoid picking someone marked as "away."

It's fine if she picks somebody who's temporarily AFK or on vacation without being "away," as she can be asked to pick again.

Plugins that work asynchronously should raise a special exception

This really applies to when helga is set to reply with the first plugin response it receives. If one plugin does some work via a deferred and returns None, it will move along to another plugin. Right now this happens when JIRA and Reviewboard keywords both are in a message (assuming the JIRA plugin fetches ticket descriptions).

I think that if a plugin should need to do something with a deferred, there should be a rule that it raises a known exception that can prevent other plugins from running. Something like this

from twisted.internet import reactor
from helga.async import DeferredInProgress

def do_something_later():
    return 'foo'

def my_plugin(*args):
    reactor.callLater(60, do_something_later)
    raise DeferredInProgress

Flood control/Rate Limit

Plugins should have an optional rate limiter. I should be able to specify a rate limiter via plugin decorators that is equivalent to a maximum number of responses per minute, per channel.

@match('foo', rate_limit=5)
def this_is_noisy(*args):
    pass

Comment imgur links

Some of them already have comments, but it would really nice if I didn't have to open up a browser just to know what gif i'm linking to.

Announcements as a service

I'd like to toss some shell script into the works in our Hudson/Jenkins jobs that will cause some announcement to happen in IRC. It would be nice to have an interface like this:

curl \
    -d "target=#platform" \
    -d "message=FE5 successfully finished deploying" \
    http://yourmachine:9999/helga

and helga would say "FE5 successfully finished deploying" in the platform channel (joining it if necessary and leaving afterward if she wasn't there to begin with.)

I'm not sure what the best way would be to limit who is allowed to post such announcements to helga.

Rate Limit Contextual Plugins

Contextual plugins should, by default, keep track of the things they provide some context for. This will reduce possibility of flood.

Deferred Tweets

Tweets are currently done synchronously. They should really be done asynchronously and then report back to the user/channel with the response.

expose signals via helga core

Some plugins use smokesignal to deal with callbacks, but it requires some confusing logic regarding imports. One should be able to import helga.signals directly. Also, it would be nice to have some predefined signals available.

About plugin

I'd like to ask helga for more info about plugins. This should return any relevant docstring from the plugin class so that helga about foo messages me with details

make case-handling smarter

My recent change to make helga ignore case when responding to commands is also lowercasing haiku lines:
jveatch: helga haiku use fives CAP CAP CAP CAP CAP
helga: cap cap cap cap cap
etc, etc

Twitter-based Interactions

I think it would be really cool if @HelgaBot could respond to mentions and replies (in a sane way). This should only work if a twitter account is configured for tweeting haikus but should be configurable to be disabled

Duplicate JIRA links

If I mention the same JIRA ticket twice, helga shows two links instead of one

git repository watcher

I'd like a plugin where one could configure helga to announce when someone has pushed commits up to certain branches of certain git repositories.

<helga> cmgdeploy just pushed 4 commits to branch master in storyville
<helga> datagrok just pushed 4 commits to branch CMS-1234 in storyville
<helga> it looks like sduncan just rebased and force-pushed CMS-1234 in storyville.

Helga needs a better deployment procedure

Right now I have documentation written as "virtualenv; git clone; python setup.py...". That's far from ideal. Helga is now packaged on PyPI, so there should really be puppet/chef/etc configs

TIL tracking

Our boss wants a weekly sharing of what we learned in the past week.

I have a hard time remembering when I learned a thing, and remembering a list of all the things I learned.

I'd like to eliminate the ensuing paperwork by asking Helga to remember when I say "TIL ..." Maybe she can report back during our IRC standup, or maybe just stick those utterances into a page on the Intranet for us to summarize.

Maybe this issue really is for a general-purpose utility for Helga to append a blob of text to a page on a Confluence wiki?

Extension help to message user

Showing help messages on a channel gets noisy. Doing helga help foo should message the user directly rather than responding in a channel

Better documentation

Helga's documentation is ok for now, but it should probably have some better, more detailed documentation on the internals

Meme Info Plugin

I'd like to be able to ask helga about certain memes. I imagine this would come straight from Know Your Meme. Something like:

helga memeinfo look of disapproval

Split up the oneliners plugin

The oneliners plugin is a massive collection of stuff I didn't know where to previously put. Split things up into new plugins where possible.

Remove commas from JIRA/Reviewboard

Some irc clients will hyperlink URLs in such a way that commas are tacked onto the end, which will 404 for some users. Remove the commas and use plain spaces instead.

Make helga.log not suck

The helga.log is a hacky sort of way I put together to handle a single log file. Instead, consider having a logging dictConfig type of configuration for various loggers.

cannot delete reminder

There is a reminder I did not create but even though I am an admin I cannot delete the hash.
The bot replies with no errors.

Think of a better way to handle helga settings

When I first wrote helga, the settings.py logic seemed like a good choice at the time. But now it's kind of a pain to use an environment variable set to an importable python module. I should be able to run helga with a path to a config file like helga --config=config.py.

Other possible alternatives to python based configuration could be ini, toml, yaml, etc

Giphy By Whitelist Only

Until the giphy api allows me to filter possibly inappropriate content, the giphy plugin should only work either via private message or on whitelisted channels.

WIP: Better plugin management

Pull out all the noisy/extra plugins and have them in their own repo. Look at the Flask model for extension management and see about using a bit of that here

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.