Giter VIP home page Giter VIP logo

tpobot's Introduction

TPO IIT (BHU) Bot

A facebook messenger bot which gives real time updates of Training and Placement portal of IIT (BHU) to the students. The bot periodically crawls the company's visit page and sends private text messages to registered users about new companies according to their branch and course.

The bot uses Django as backend framework for webhook, Celery as asynchronous task manager, Redis as message broker, Wit as intent parser, sqlite3 as database for development on local machine and postgres for production on heroku, python's requests module for web crawling and Ngrok to setup a secure tunnel to localhost for development purposes.

The bot runs three jobs (1 Web server, 1 celery worker and 1 celery beat) on two dynos of heroku. ๐Ÿ˜Ž

Installation

  • Install required dependencies pip install -r requirements.txt
  • Make sure redis is >= 2.10.5, if not, run pip install celery[redis]
  • Migrate db python manage.py migrate
  • Start Dev server with python manage.py runserver
  • Use ngrok with ./ngrok http 8000
  • Start redis-server with redis-server
  • Run Celery workers with celery -A tpobot worker -l info
  • Run Celery beat with celery -A tpobot beat -l info

Set environment variables

  • Your server's verify token as VT
  • FB page access token as AT
  • TPO username as username
  • TPO password as password
  • Wit access token as wit_server_AT

Important Points

  • Activate python environment before running celery

Tutorials

Some Help

License: MIT

tpobot's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

auhan99

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.