Skip to content

Instantly share code, notes, and snippets.

@thisisshi
Last active April 8, 2019 07:39
Show Gist options
  • Save thisisshi/a004dfaad32067d9245f02376baca772 to your computer and use it in GitHub Desktop.
Save thisisshi/a004dfaad32067d9245f02376baca772 to your computer and use it in GitHub Desktop.
Quick and Dirty Emoji Export from Slack
// Go to: https://<team>.slack.com/customize/emoji
// Open Developer Console
// Copy/Paste and Run this in the console:
var spans = document.getElementsByTagName('span');
var basharray = "( "
for (var i=0;i<spans.length;i++) {
var link = spans[i].getAttribute("data-original");
if(link != null){
basharray = basharray.concat(link, " ")
}
}
console.log(basharray.concat(")"))
#!/bin/bash
# Downloads emojis to emojis folder
emojis=<insert the console output of emojis.js>
mkdir -p emojis
for i in "${emojis[@]}"
do
:
file=$(echo "${i#*/}" | awk -F/ '{ print $4 }')
filename="$file.png"
curl -vk $i > emojis/$filename
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment