Giter Club home page Giter Club logo

emoji_search's Introduction

Slack Emoji Search

A commandline utility to search across Slack for messages that were reacted to with a specific emoji. For example, you might ask your teammates to tag especially useful messages with a specific emoji, and you can use this tool to dump a log of those messages.

(If you're interested in this tool, you might also be interested in a plugin that files emoji-tagged messages as issues in a GitHub repository.)

Installation (simple)

The simplest way to install this package is to use pip to install the package from the Python Package Index:

$ pip install slack-emoji-search

Installation (detailed / developer)

Ensure Python, pip, virtualenv and virtualenvwrapper are set up. If you've run the laptop script, you're all good.

Assuming you are using Python 2.7.9+ or 3.4+ the following steps should work:

$ python -m ensurepip
$ pip install virtualenv virtualenvwrapper

Clone the repo, set up a python virtualenvironment, and install requirements:

$ git clone https://github.com/18F/emoji_search.git ~/emoji_search
$ cd ~/emoji_search
$ mkvirtualenv emoji_search
$ pip install -r requirements.txt

Optionally make script executable outside of virtualenv

If you always plan on running the script with the virtualenv activated, you can skip this step.

Activate virtualenv if necessary:

$ workon emoji_search && cd ~/emoji_search

Make script executable:

$ echo '#!'`which python`|cat - emoji_search.py > /tmp/out && mv /tmp/out emoji_search.py
$ chmod 755 emoji_search.py

Usage

You will need a Slack API key. You can get this from the Slack website. The script expects the token to be in a file in the same directory, which will not be checked in to Github. To create it, run the following from the ~/emoji_search directory, subbing in your token and making sure to keep the quotes:

echo "API_TOKEN = '<MY-API-TOKEN>'" > api_token.py

If you did not make the script executable in the optional step above use python ~/emoji_search/emoji_search.py in place of ~/emoji_search/emoji_search.py below:

To query for messages reacted to with the ๐ŸŒฒ emoji between Nov 2, 2015 and Oct 31, 2015 and write the output to a file called evergreen.txt in the current directory, run:

~/emoji_search/emoji_search.py --emoji evergreen_tree \
                               --startdate 10-31-2015 \
                               --enddate 11-02-2015 \
                               --outfile evergreen.txt

All flags are optional except for --emoji. If no destination file is provided, results will be written to the terminal.

Public Domain

18F's work on this project is in the worldwide public domain.

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

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.