https://github.com/ghostsquad/morelia
Slack Bot written in Python
https://github.com/ghostsquad/morelia
Last synced: about 1 year ago
JSON representation
Slack Bot written in Python
- Host: GitHub
- URL: https://github.com/ghostsquad/morelia
- Owner: ghostsquad
- License: mit
- Created: 2016-09-02T18:43:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-08T23:13:54.000Z (over 9 years ago)
- Last Synced: 2025-03-09T00:45:53.617Z (about 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Morelia
Slack Bot written in Python
https://en.wikipedia.org/wiki/Morelia_(snake)
## Install
```Bash
pip install morelia
```
or
```Bash
docker pull ghostsquad/morelia
```
## Usage
You can define which components should be loaded in the `.morelia` file.
```Yaml
effectors:
- package.effector_name
- morelia.effectors.slack
sensors:
- package.sensor_name
- morelia.sensors.slack
interpreters:
- package.interpreter_name
- morelia.interpreters.slack_greetings
```
Ensure that other effectors, sensors and interpreters are installed or can be found in `PYTHONPATH`.
### Docker
Run a morelia docker container with out external packages installed.
```Bash
docker run -d -e PYTHONPATH=/opt/ -v /path/to/mypkg:/opt/mypkg -v $(pwd)/.morelia:/.morelia ghostsquad/morelia
```
To create a morelia bot without mounting, and with external packages, you need to build a new image like so...
Given the following directory structure for your morelia bot
```Bash
.
|-- .morelia
|-- my_awesome_bot
`-- __init__.py
```
Your `Dockerfile` should look like this
```Dockerfile
FROM ghostsquad/morelia
ENV PYTHONPATH=/opt/
RUN pip install
WORKDIR /opt
COPY . /opt
```
Then you can run
```Bash
docker run -d my_awesome_bot
```