1
0
Go to file
Ash Wilson c49d621746 Merge pull request #6 from kvarga/check_existing_emojis
Refactoring, Check if emoji already exists, and improved error detection
2016-08-01 08:38:55 -04:00
.env.example We need a new crumb for each request. 2015-02-24 21:57:04 -06:00
.gitignore Ignore .env. 2015-02-22 11:29:40 -05:00
LICENSE Initial commit 2015-02-22 09:07:37 -05:00
README.md Forgot about the .env file. 2015-02-24 22:16:19 -06:00
requirements.txt Note dependencies. 2015-02-24 21:42:50 -06:00
upload.py Refactoring, check if emoji exists before uploading, and improved error handling 2016-07-31 12:26:08 -05:00

Slack Emojinator

Bulk upload emoji into Slack

Want to create a custom Slack emoji for every pokemon? Slack doesn't currently expose an API endpoint for creating emoji, probably to prevent users from doing exactly what I'm doing, but here's a way to do it anyway.

Creating Emoji

You'll need Python and pip to get started. I recommend using virtualenv and possibly virtualenvwrapper as well. Standard best-practice Python stuff.

Prepare a directory that contains an image for each emoji you want to create. Remember to respect Slack's specifications for valid emoji images: no greater than 128px in width or height, no greater than 64K in image size. The base filename of each image file should be the name of the emoji (the bit you'll type inside : to display it).

Clone the project, create a new virtualenv, and install the prereqs:

git clone https://github.com/smashwilson/slack-emojinator.git
cd slack-emojinator
mkvirtualenv slack-emojinator
pip install -r requirements.txt

You'll need to provide your team name (the bit before ".slack.com" in your admin URL) and your session cookie (grab it from your browser). Copy .env.example, fill them in, and source it.

cp .env.example .env
${EDITOR} .env
source .env

Now you're ready to go. Use a shell glob to invoke upload.py with the emoji files as ARGV:

python upload.py ${EMOJI_DIR}/*.png