Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ineshbose/boyd_bot_messenger

Boyd Bot (Flask Version)
https://github.com/ineshbose/boyd_bot_messenger

bot chatbot dialogflow facebook-messenger flask glasgow timetable university

Last synced: 11 days ago
JSON representation

Boyd Bot (Flask Version)

Awesome Lists containing this project

README

        

# ![Logo](https://raw.githubusercontent.com/ineshbose/boyd_bot_messenger/master/docs/images/readme.png)


GitHub deployments
Codacy grade
Code Climate maintainability
Read the Docs
Libraries.io dependency status for GitHub repo
GitHub tag (latest by date)


License
Security: bandit
Code style: black
Gitter
Powered by Boyd Bot



Facebook
Messenger
Behance
Messenger

This repository is for the Flask version of the Boyd Bot - a chatbot helping university students with their timetable.

## 🔧 Setup

### Cloning

The first step is to clone the repository in your preferred directory using

```sh
$ git clone https://github.com/ineshbose/boyd_bot_messenger
$ cd boyd_bot_messenger
```

This requires [Git](https://git-scm.com/) installed; you can also download a [ZIP](https://github.com/ineshbose/boyd_bot_messenger/archive/master.zip) instead.

### Packages

All requirements have been listed in `requirements.txt`, they can be installed in your preferred environment using

```sh
$ pip install -r requirements.txt
```

### Environment Variables

Access tokens, keys, etc. have been hidden from the repository for obvious reasons. These are used as environment variables.

```python
import os

xyz = os.environ.get("XYZ_KEY")
```

You **must** replace these with your own. You can either just replace `os.environ.get()` with the value (**this is discouraged**), or use

```sh
$ set XYZ_KEY="random_key_value"
```

## 🏛️ Want to use this for your university? [Fork it!](https://github.com/ineshbose/boyd_bot_messenger/fork)

It's lovely to know that you're considering to use this for your university. This project aims to act a base for many other chatbots. You can also [use this repository as a template](https://github.com/ineshbose/boyd_bot_messenger/generate). A good idea is to start development with the [terminal / CLI version](https://github.com/ineshbose/boyd_bot_terminal). The following are considerations / instructions that you should know about if you aren't aware:

### Services

This version uses some external services that should be easily replaceable.

* [Facebook Messenger](https://www.facebook.com/messenger): The idea for this project is to present the timetable without having to install another application. A large number of university students use Facebook and its messaging service - Messenger. Users are identified using their unique IDs generated by Facebook specific to the app.
* [Dialogflow](https://dialogflow.com/): also known as API AI. This enables webhook, integration with Facebook Messenger (and also other messaging services if needed), intents and small talk.
* [mongoDB](https://www.mongodb.com/): This is to store user details to acquire their timetable while being fast and convenient.

### Instructions

The code is documented using _docstrings_ and on [Read the Docs](https://boyd-bot-messenger.readthedocs.io/en/latest/); make sure you go through it. Since this repository acts like a template, there is not much to change. Much of it is mentioned, for example

```python
tmzn = pytz.timezone("Europe/London") # Timezone
cal_url = "link/to/timetable.ics" # University ICS link
```

Templates should also be tailored to your need. Go through the files in [templates](https://github.com/ineshbose/boyd_bot_messenger/blob/master/boyd_bot/templates) and [static](https://github.com/ineshbose/boyd_bot_messenger/blob/master/boyd_bot/static).

### Deployment

Be sure to do your research on where and how to deploy your code! Make sure that access tokens, keys, etc. are changed, and, along with the code & database, are **secure**.

## 🙌 Contributions & Thanks

Contributions are more than welcome in any form, they are all allowed under the [MIT License](https://github.com/ineshbose/boyd_bot_messenger/blob/master/LICENSE)! 😄

There may be some planned updates or issues for this project. They're listed in the [issues section](https://github.com/ineshbose/boyd_bot_messenger/issues) with a helpful description (hopefully). Feel free to help out in order to solve these.