Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aichaos/admiral
A Python chatbot for Slack and Google Hangouts
https://github.com/aichaos/admiral
Last synced: 3 months ago
JSON representation
A Python chatbot for Slack and Google Hangouts
- Host: GitHub
- URL: https://github.com/aichaos/admiral
- Owner: aichaos
- License: gpl-2.0
- Created: 2015-11-25T22:18:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-08T18:38:10.000Z (over 4 years ago)
- Last Synced: 2024-07-30T20:25:44.966Z (5 months ago)
- Language: Python
- Size: 24.4 KB
- Stars: 11
- Watchers: 6
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Admiral
Admiral is a Python chatbot that utilizes RiveScript and connects to some chat
platforms.Currently it only connects to Slack. Integrating it with Google Hangouts (via
[hangups](https://github.com/tdryer/hangups)) is on the road map too.# Requirements
This bot requires [Python 3](https://www.python.org/) to run. It's recommended
to use [virtualenv](https://virtualenv.readthedocs.org/en/latest/) and
[virtualenvwrapper](https://virtualenvwrapper.readthedocs.org/en/latest/) to
create an isolated environment to install this bot's dependencies in.Quick start:
```bash
$ git clone https://github.com/aichaos/admiral
$ cd admiral/
$ mkvirtualenv -p /usr/bin/python3 admiral
(admiral)$ pip install -r requirements.txt
```# Configuration
This bot is configured via a YAML config file. The default configuration comes
from the `defaults.yml` file, which you **should not edit.**To configure the bot, create a file named `settings.yml` and fill in the keys
to override the desired settings from `defaults.yml`. For the lazy you can just
copy `defaults.yml` and name it `settings.yml` and then go through and edit it
in your text editor.An example `settings.yml` which leaves all the defaults but just configures the
Slack interface would look like the following:```yaml
admiral:
interfaces:
- interface: slack
id: "Admiral-Slack"
enabled: true
username: admiral
api_token: xxxfakekeyxxx
```# Running the Bot
Run the bot by executing the `admiral-cli.py` script from your virtualenv.
Usage:
```
usage: admiral-cli.py [-h] [--debug] [--config CONFIG] [--quiet]Admiral chatbot.
optional arguments:
-h, --help show this help message and exit
--debug, -d Enable debug mode (verbose logging to console).
--config CONFIG, -c CONFIG
Configuration file to use, default is settings.yml
--quiet, -q Suppress logging to the console; only write logs into
the status log file (default is logs/status.log)
```By default it will log INFO-level messages to your console as well as to the
`logs/admiral.log` file.Chat messages with users are stored in the `logs/chats/` directory, one for
each username the bot interacted with.# License
```
Admiral Chatbot
Copyright (C) 2015 Noah PetherbridgeThis program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
```