I found it when I was looking for "Is there a Python chatbot?", So I will use it for a while.
http://errbot.io/
A collection of my own understanding when checking roughly from the document
Try to install
$ pyenv virtualenv 3.5.1 errbot
$ pyenv shell errbot
$ pip install errbot slackclient
$ mkdir mybot
$ cd mybot
$ python -c "import errbot;import os;import shutil;shutil.copyfile(os.path.dirname(errbot.__file__) + os.path.sep + 'config-template.py', 'config.py')"
Places that should be modified for "operation check for the time being"
config.py
# L66
#Folder for saving data. Relative path is easier to check behavior
BOT_DATA_DIR = './data'
# L85
#Where to put custom plugins. The default is None, but if you make it anyway, use a relative path
BOT_EXTRA_PLUGIN_DIR = './plugins'
For the time being, try starting it with text on the backend
$ vi config.py
$ errbot -T
22:30:14 INFO errbot.err Config check passed...
22:30:14 INFO errbot.err Selected backend 'Text'.
(Omission)
22:30:15 INFO errbot.errBot
22:30:15 INFO errbot.errBot Notifying connection to all the plugins...
22:30:15 INFO errbot.plugins.ChatRoom Callback_connect
22:30:15 INFO errbot.errBot Plugin activation done.
>>>
By default, the text that starts with !
Is recognized as an instruction to the bot.
As a test, when I call for help, it looks like this.
errbot
>>> !help
╌╌[MD ]╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
### All commands
╌╌[HTML]╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
<h3>All commands</h3>
╌╌[TEXT]╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
All commands
╌╌[IM ]╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
_All commands_
╌╌[ANSI]╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
All commands
╌╌[BORDERLESS]╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
All commands
>>>
I omitted it because the amount of output is extremely large, but it returns the response in various formats such as Markdown, HTML, plain text. For example, if you start Slack to react, it will return it in HTML format.
I'm playing around with it, so I'd like to post it here and there.
Recommended Posts