Code Monkey home page Code Monkey logo

lovinglanguagebot's Introduction

About

A loving language bot to support experiments around language usage in slack.

Requirements

  • developed with python 3.6. probably works with other versions of python 3+.
    • to make a virtual env with a specific version of python: mkvirtualenv --python=/usr/bin/python3.6 <name>. Your python paths may vary.
  • pip install -r requirements.txt

Setup

This bot requires the environment variables LOVING_LANGUAGE_SLACK_TOKEN and LOVING_LANGUAGE_BOT_ID to be set. One way to reliably do this is to use a virtual env (which is recommended regardless) and then symlink the postactivate hook to a local version. Like so:

  • create and activate your virtualenv (mkvirtualenv <name> and then workon <name>)
  • in your loving language bot directory: mkdir .env
    • --> this is in the .gitignore file so will not be committed. do NOT commit these values as this allows anyone to control your bot.
  • copy the file postactivate.example to the .env drectory and remove the .example, so that the file is just named postactivate.
  • edit the file to fill in the values of the environment variables, which you should get from an admin on your slack team.
  • make a symlink from the default postactivate hook to your custom one: ln -s /path/to/repo/.env/postactivate $VIRTUAL_ENV/bin/postactivate
    • this presumes that your postactivate hook is otherwise empty. if there are other things you have or want in there, then merge them with your local version.

Make sure to add/invite your bot to any channels you want it to participate in.

Running

$ workon <virtual env name>

$ ./loving.py

lovinglanguagebot's People

Contributors

jessykate avatar

Watchers

 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.