Giter Site home page Giter Site logo

jdk2588 / slack-sounds Goto Github PK

View Code? Open in Web Editor NEW

This project forked from caseyfw/slack-sounds

0.0 1.0 0.0 4.39 MB

A python slack client that plays sounds in response to "play blah.mp3" messages

License: MIT License

Python 97.33% Shell 2.67%

slack-sounds's Introduction

slack-sounds

A client for Slack.com, that plays sound files on request e.g. play trololo.

This is designed to run on a box in your office hooked up to speakers. That way everyone in your slack channel can enjoy its magic.

Overview

This plugin implements the python-slackclient to listen to channels its in (or direct messages) and responds to requests to play sounds of the format:

play filename

Installation

Automatic w/ PyPI

$ sudo apt-get install python-dev
$ sudo pip install websocket
$ sudo pip install slackclient

You'll also need an audio player that can handle the format

$ player path/to/file.mp3

I recommend mpg123 because it 'just works' with mp3s. Alternatives are aplay, paplay, mplayer, etc.

$ sudo apt-get install mpg123

Usage

Note: You must obtain a token for the user/bot. You can find or generate these at the Slack API page. You also need to create the bot for that matter.

Put the token in a file called token.txt in the same directory as sounds.py

Run the bot:

$ python sounds.py

Chat with the bot directly, or post in a channel its a member of:

play rollout

Note: The default sounds were lifted directly from here: http://www.emoji-cheat-sheet.com/ (thanks campfire!)

slack-sounds's People

Contributors

rawdigits avatar caseyfw avatar mlaferrera avatar synforge avatar paulhammond avatar

Watchers

Jaideep Khandelwal 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.