GithubHelp home page GithubHelp logo

nelsonam / command_center Goto Github PK

View Code? Open in Web Editor NEW

This project forked from singlerider/command_center

0.0 2.0 0.0 169 KB

An automated notification and communications system for software service emergencies.

Python 100.00%

command_center's Introduction

command_center

An automated notification and communications system for software service emergencies.

Right now it's mostly a message logger for Slack messages to Google Drive, though.

Installation

Important

This project was made using Python 2.7.x

Due to the type of string formatting employed, this will not work prior to 2.7.

It is possible to set up an environment with 2.7, even if your server's primary env is 2.6 or earlier. With your favorite package manager, install python2.7 using one of the various online guides. Once that's done, install the dependencies as outlined below, with the exception of replacing pip with pip-2.7.

Pre-game

First, you'll need a config file. From your project directory, run:

cp src/config/config_example.py src/config/config.py

Head over to

https://YOURSLACKCHANNEL.slack.com/admin/settings

and enable IRC gateways, then go to

https://YOURSLACKCHANNEL.slack.com/account/gateways

and get your gateway, username, and IRC-specific password and plug them into your brand new config file.

Google API

Python Quickstart

Use the wizard at:

https://console.developers.google.com/flows/enableapi?apiid=drive

to get started creating your application and managing your auth flow.

Once the Google Drive API is enabled, go the the "Credentials" tab in the Developer's Console.

Add Credentials

Click "Add Credentials" and generate an API Key (Server Key) and an OAuth 2.0 Client ID (Other)

Download your generated clien_secret json file and rename it to "client_secrets.json" then place it in your project's root directory - PyDrive looks for this specific file in this specific place.

Virtual Environment

I would recommend running this in a virtual environment to keep your dependencies in check. If you'd like to do that, run:

sudo pip install virtualenv

Followed by:

virtualenv venv

This will create an empty virtualenv in your project directory in a folder called "venv." To enable it, run:

source venv/bin/activate

and your console window will be in that virtualenv state. To deactivate, run:

deactivate

Dependencies

To install all dependencies locally (preferably inside your activated virtualenv), run:

pip install -r requirements.txt

To Run

From the project's root directory, run:

./serve

The first time you run this, a message in the console will ask you to paste a link into a browser's address bar and authorize the application to modify your Google Drive files. After you accept, you will see a code that should be pasted back into the console. After this initial authorization, the app will be connected to your GDrive account.

TODO

Fix errors for foreign character encoding

command_center's People

Contributors

singlerider avatar

Watchers

nelsonam avatar James Cloos 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.