Created
April 20, 2021 02:56
-
-
Save yamachu/790ac4b819ac8933ff9f535217ee6667 to your computer and use it in GitHub Desktop.
Slackのcustom emojiを全部ぶっこ抜いてくるやつ(Windows環境でもすぐ出来るようにPowerShellで書いたやつ、もちろんmacでも動く)
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
// 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