Git Product home page Git Product logo

mftp's Introduction

mftp

Deploy

Get emails when T&P stuff changes on IIT KGP's ERP.

Setup

Deploy to Heroku and set config variables.

Required config variables

The following is a list of all the config variables that are required for MFTP to work:

EMAIL_ADDRESS
ERP_A1
ERP_A2
ERP_A3
ERP_PASSWORD
ERP_Q1
ERP_Q2
ERP_Q3
ERP_USERNAME
MAILGUN_API_KEY
MAILGUN_DOMAIN
MAILGUN_PUBLIC_KEY
MAILGUN_SMTP_LOGIN
MAILGUN_SMTP_PASSWORD
MAILGUN_SMTP_PORT
MAILGUN_SMTP_SERVER
MONGODB_URI
NOTICES_EMAIL_ADDRESS

Among these, the variables prefixed by MAILGUN will be added by Heroku when you run the command heroku addons:create mailgun:starter.

The MONGODB_URI env variable will be set by heroku addons:create mongolab:sandbox.

You need to add the other variables. You can add either by using the command heroku config:set KEY=VALUE from the command line, or you can use the Heroku web interface, under the Settings tab.

Testing on local system

  1. Make a copy of the .env-template file and rename it to .env in the root directory.

cp ./.env-template ./.env

  1. Add values of all the variables in the newly created .env file accordingly. (Descriptions of all the varibales can be found in app.json). Note : app.json does not contain DEBUG variable as it explicitly configures scripts to run in local environment friendly way.

  2. Install all the python modules from the requirements file. Note : The program runs on Python 2

pip install -r requirements.txt

  1. Run settings.py to load variables from .env file to the local environment.

python settings.py

  1. Now run the main tornado server.

python main.py

WTF

mftp monitors your ERP account for changes to the notices and the companies list, and sends you an email if there are any new or modified entries. Your credentials are stored as Heroku config variables, and you run your own Heroku instance.

License

GPLv3. Issues and pull requests are welcome.

mftp's People

Contributors

amrav avatar thealphadollar avatar ghostwriternr avatar icyflame avatar defcon-007 avatar athityakumar avatar dibyadas avatar xypnox avatar

Watchers

James Cloos avatar  avatar

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.