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.)
$ pip install slack-emoji-search
Installation (detailed / developer)
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
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
To query for messages reacted to with the
~/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.
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.