From 0b06098e6bfccb3be48b34e25d6a7cfa03ebdf57 Mon Sep 17 00:00:00 2001 From: Felipe Martin Date: Sun, 13 Dec 2020 08:27:18 +0100 Subject: [PATCH] Documentation --- README.md | 34 +++++++++------------------------- docs/README.md | 6 +++++- docs/contributing.md | 23 +++++++++++++++++++++++ docs/platforms.md | 8 ++++++++ docs/plugins.md | 11 +++++++++++ 5 files changed, 56 insertions(+), 26 deletions(-) create mode 100644 docs/contributing.md create mode 100644 docs/platforms.md create mode 100644 docs/plugins.md diff --git a/README.md b/README.md index 24823b7..7fb78d6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Butter Robot -![Build stable tag docker image](https://github.com/fmartingr/butterrobot/workflows/Build%20stable%20tag%20docker%20image/badge.svg?branch=stable) -![Build latest tag docker image](https://github.com/fmartingr/butterrobot/workflows/Build%20latest%20tag%20docker%20image/badge.svg?branch=master) +| Stable | Master | +| --- | --- | +| ![Build stable tag docker image](https://github.com/fmartingr/butterrobot/workflows/Build%20stable%20tag%20docker%20image/badge.svg?branch=stable) | ![Build latest tag docker image](https://github.com/fmartingr/butterrobot/workflows/Build%20latest%20tag%20docker%20image/badge.svg?branch=master) | +| ![Pytest](https://github.com/fmartingr/butterrobot/workflows/Pytest/badge.svg?branch=stable) | ![Pytest](https://github.com/fmartingr/butterrobot/workflows/Pytest/badge.svg?branch=master) | Python framework to create bots for several platforms. @@ -9,25 +11,9 @@ Python framework to create bots for several platforms. > What is my purpose? -## Supported platforms +## Documentation -| Name | Receive messages | Send messages | -| --------------- | ---------------- | ------------- | -| Slack (app) | Yes | Yes | -| Telegram | Yes | Yes | - -## Provided plugins - - -### Development - -- `!ping`: Say `!ping` to get response with time elapsed. - -### Fun and entertainment - - -- Lo quito: What happens when you say _"lo quito"_...? (Spanish pun) -- Dice: Put `!dice` and wathever roll you want to perform. +[Go to documentation](./docs) ## Installation @@ -44,12 +30,11 @@ $ python -m butterrobot ### Containers -The `fmartingr/butterrobot/butterrobot` container image is published on Github packages to -use with your favourite tool: +The `fmartingr/butterrobot/butterrobot` container image is published on Github packages to use with your favourite tool: ``` docker pull docker.pkg.github.com/fmartingr/butterrobot/butterrobot:latest -podman run -d --name fmartingr/butterrobot/butterrobot -p 8080:8080 +podman run -d --name fmartingr/butterrobot/butterrobot -p 8080:8080 ``` ## Contributing @@ -62,8 +47,7 @@ cd butterrobot poetry install ``` -Create a `.env-local` file with the required environment variables, -you have [an example file](.env-example). +Create a `.env-local` file with the required environment variables, you have [an example file](.env-example). ``` SLACK_TOKEN=xxx diff --git a/docs/README.md b/docs/README.md index 510be1b..e1e0ef4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,8 @@ # Butterrobot Documentation ## Index -- [Creating a Plugin](./creating-a-plugin.md) +- [Contributing](./contributing.md) +- [Platforms](./platforms.md) +- Plugins + - [Creating a Plugin](./creating-a-plugin.md) + - [Provided plugins](./plugins.md) diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 0000000..d175791 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,23 @@ +## Contributing + +To run the project locally you will need [poetry](https://python-poetry.org/). + +``` +git clone git@github.com:fmartingr/butterrobot.git +cd butterrobot +poetry install +``` + +Create a `.env-local` file with the required environment variables, you have [an example file](.env-example). + +``` +SLACK_TOKEN=xxx +TELEGRAM_TOKEN=xxx +... +``` + +And then you can run it directly with poetry + +``` +docker run -it --rm --env-file .env-local -p 5000:5000 -v $PWD/butterrobot:/etc/app/butterrobot local/butterrobot python -m butterrobot +``` diff --git a/docs/platforms.md b/docs/platforms.md new file mode 100644 index 0000000..0acbbe9 --- /dev/null +++ b/docs/platforms.md @@ -0,0 +1,8 @@ +## Supported platforms + +TODO: Create better actions matrix + +| Name | Receive messages | Send messages | +| --------------- | ---------------- | ------------- | +| Slack (app) | Yes | Yes | +| Telegram | Yes | Yes | diff --git a/docs/plugins.md b/docs/plugins.md new file mode 100644 index 0000000..e4fcd29 --- /dev/null +++ b/docs/plugins.md @@ -0,0 +1,11 @@ +## Provided plugins + +### Development + +- `!ping`: Say `!ping` to get response with time elapsed. + +### Fun and entertainment + + +- Lo quito: What happens when you say _"lo quito"_...? (Spanish pun) +- Dice: Put `!dice` and wathever roll you want to perform.