Last active
May 7, 2019 03:50
-
-
Save masutaka/057a7a4a1b4bbb4320b73dcb59bc7705 to your computer and use it in GitHub Desktop.
Export Slack custom emoji
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# You can get on https://api.slack.com/methods/emoji.list/test | |
endpoint='https://slack.com/api/emoji.list?token=<SECRET>&pretty=1' | |
json=$(curl -s $endpoint) | |
keys=$(echo $json | jq -r '.emoji | keys[]') | |
mkdir -p images | |
for key in $keys; do | |
url=$(echo $json | jq -r ".emoji[\"$key\"]") | |
if echo $url | grep -q -e '^alias'; then | |
continue | |
fi | |
echo "$key: $url" | |
curl -s $url > images/$key | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
images/*
using this scriptthx! Slackの絵文字(emoji)を一括エクスポート&インポートする - Qiita