Giter Site home page Giter Site logo

lefttoright's Introduction

LeftToRight

Tests

Provides a suggested order for members of a channel doing a virtual standup. It grabs a list of members in the channel from which the slash command was called, and returns them in a randomized list, sometimes after having applied some fun text transformations.

You'll need a slackbot with the following scopes/permissions added:

channels:read
chat:write
commands
users:read

In your environment (shell, etc.) you'll need these variables set:

export LTR_SLACK_API_TOKEN='xoxb-[etc.]' # your slack bot API token which slack uses to validate requests coming from your app
export LTR_LOCAL_TOKEN='somerandomsecret' # your locally set token which this app uses to validate requests coming from slack

You'll also need:

  • to invite your bot to any private channel you'd want to use it from
  • a slash command set up to point to the public URL of wherever you've got it deployed, plus your locally-set app token passed to the token argument. For example, if you had your token set to yay and app being served from http://deployed.wow/ltr/, this would yield a successful query: http://deployed.wow/ltr/?token=yay

In the command itself, you can specify a transformation by passing leet, shifted, nicknames, or one of the other functions registered in transformations.py โ€” or no transformation by passing normal. Without specifying, the command follows the default behavior of choosing a random transformation half the time.

If you're doing development on this application, use poetry to manage Python packages, but make sure to run

poetry export -o requirements.txt

for deployment purposes, if there are any changes to poetry.lock.

If you want to add transformations, you can put them in transformations.py and decorate them with @register.

The few doctests present so far can be exercised by running poetry run pytest.

lefttoright's People

Contributors

bensteinberg avatar chefandy avatar matteocargnelutti avatar kilbergr avatar

Stargazers

Nick Fn Blum avatar

Watchers

Greg Leppert avatar Brennan Chesley avatar Jack Cushman avatar  avatar James Cloos avatar  avatar Dakota Sexton avatar Rebecca Lynn Cremona avatar  avatar  avatar Nick Fn Blum 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.