[PYTHON] A memo to move Errbot locally

I found it when I was looking for "Is there a Python chatbot?", So I will use it for a while.

http://errbot.io/

Manual diagonal reading

A collection of my own understanding when checking roughly from the document

Installation

Assumed environment

Until installation

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')"

Add settings

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'

Try to run

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.

>>>

Roughly, behavior explanation

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

A memo to move Errbot locally
A memo to create a virtual environment (venv) before Django
A memo connected to HiveServer2 of EMR with python
A memo of how to use AIST supercomputer ABCI
A memo to visually understand the axis of pandas.Panel
Flow memo to move LOCUST for the time being
[Python] A memo to write CSV vertically with Pandas
To myself as a Django beginner (4) --Create a memo app--
A memo on how to easily prepare a Linux exercise environment
How to run a trained transformer model locally on CloudTPU
Steps to install a Git cloned package locally with pip
How to develop in a virtual environment of Python [Memo]
[End of 2020] A memo to start using AWS CLI (Version 2)
A quick introduction to pytest-mock
A road to intermediate Python
A super introduction to Linux
Add a dictionary to MeCab
How to call a function
Upload a file to Dropbox
Send a signal to subprocess
How to hack a terminal
Try to select a language
Move CloudWatch logs to S3 on a regular basis with Lambda
[Python] A memo that I tried to get started with asyncio
[Selenium] Use a while statement to repeatedly move to the "next page"
[Python] A memo to operate ROM created by GBDK with PyBoy
How to customize U-Boot with OSD335X on a custom board (memo)
A memo when connecting bluetooth from a smartphone / PC to Raspberry Pi 4