Skip to content

Instantly share code, notes, and snippets.

@yamachu
Created April 20, 2021 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yamachu/790ac4b819ac8933ff9f535217ee6667 to your computer and use it in GitHub Desktop.
Save yamachu/790ac4b819ac8933ff9f535217ee6667 to your computer and use it in GitHub Desktop.
Slackのcustom emojiを全部ぶっこ抜いてくるやつ(Windows環境でもすぐ出来るようにPowerShellで書いたやつ、もちろんmacでも動く)
// ref: https://hush-in.hatenablog.com/entry/2019/03/24/112859
// ここにあるように https://(workspace).slack.com/customize/emoji からレスポンスぶっこ抜いてきて emojis.json みたいな名前でjsonを保存する
// 以下のスクリプトはすべて同一ディレクトリで行われるのであらかじめ汚れていいディレクトリで作業すること………
$jsonContent = (Get-Content -Path "emojis.json" -Encoding UTF8 -Raw | ConvertFrom-Json -AsHashtable).emoji
foreach ($key in $jsonContent.keys) {
// aliasとかがあるので、httpsに限定しておく
if (!$jsonContent[$key].StartsWith("https")) { continue }
Invoke-WebRequest $jsonContent[$key] -OutFile $key
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment