-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a simple chatbot for our IRC channel #62
Conversation
#!/usr/bin/env coffee | ||
|
||
path = require 'path' | ||
Bot = require path.join __dirname, '..', 'include', 'redbot', 'bot.coffee' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to take the path relative to RED_SPIDER_ROOT for more robustness and less wheel-reinventing.
Even better would be to have setup.py
(optionally?) copy the contents of include/redbot
to lib/redbot
(because it's a runtime dependency) and then have rsshell
add lib
to whatever environment variable Coffeescript uses to find libraries, so you can just require path.join redbot, bot.coffee
here.
Pretty neat, but some more questions:
|
To test it, you should just run it and see if a bot appears in |
Hey, Each command should be in a file (probably in |
Actually it doesn't receive commands, it just spouts nonsense. I have a bot that works similarly to what you're describing, though, with
|
I question the addition of multiple irc bots given that personally I I'll post a new issue with some ideas related to making the integration work |
@mrhmouse Could you put the source for that somewhere? I'd love to take a look at that. |
@WesleyAC Sorry about the delay. Here you go. |
@mrhmouse Thanks. |
# add more of such steps if that's feasible and no build system is available | ||
|
||
def install_submodules ( ): | ||
call(["git", "submodule", "update"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows this will most likely throw a WindowsError
, as git might not be in %path%.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, if git is installed it is in the PATH
. Or at least if the user installed MsysGit, but probably also in case of the other ports (because git is supposed to be used from the command line). The real problem is that the user might not have git installed. But that can be dealt with by making the redbot install optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also package some git Python module with RSP and use that instead. I don't have a preference; what do you suggest, @jgonggrijp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. What do you mean by "package some git Python module with RSP"?
Before knowing what you mean, I'm inclined to suggest that you just make the install optional. But once I know what you mean I might change my opinion. ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packaging a Python git module sounds silly. but correct me if i'm wrong, doesnt downloading the zip (the only way i can think of right now to download the project without using git) download the submodule as well? and same for downloading the project via git. doesnt it automatically download submodules too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps package the git module with creto? See #42.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, downloading the repo (zip or git) does not automatically also download the submodule.
@WesleyAC: would packaging a git module (whatever that means) with git-creto not be completely backwards? Creto only makes sense if you're already using git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "packaging a git module" I mean including something like GitPython in the project so that we can interact with the Git repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitPython looks useful. But it also seems that including it with the project would just move the problem, since it depends on GitDB. Ultimately, I think we always end up having the choice between declaring something an external dependency (and potentially making the installation of some apps dependent on it) and bloating our project with tons of included dependencies.
There doesn't seem to be much push for an IRC bot in the Red Spider Project, and our IRC channel is too dead for it to gather much chat data. Closing this. |
Aww. :-( |
Redbot is a simple chatbot for IRC. It isn't the best chatbot in the world, but it's a start.
To use Redbot, you'll need CoffeeScript.