Run from inside your Mastodon ("live") directory:bundle exec rails runner import_emoji.rb [options] [command]
--prefix [prefix]
Prefix shortcodes of all imported emoji with a string
--dry-run
Don't actually save anything to the database
--match [regexp]
Only import emoji with shortcodes that match the given regularexpression
--lower
Convert all shortcodes to lowercase
--square
Add padding to images to ensure a 1:1 aspect ratio
--minsize
Images smaller than this size (format WxH) are padded to be thissize
--hide
Hide imported emoji from the emoji picker
--no-overwriting
By default, the script will remove any custom emoji with thesame shortcode as a new one before adding the new one. Thisdisables that functionality, and will not import anyemoji with conflicting shortcodes.
--convert-gif
Convert animated GIF to animated PNG. Requires gif2apng to beinstalled.
steamgame [appid|title]
Import all emotes from a Steam game, either given its numericAppID, or the (start of) the game name. Requires the nokogiriRuby gem.
steamprofile [steam64id]
Import all Steam emotes available to a user given their profileID (find that here).
twitchchannel [channel]
Import the emotes available to subscribers of the given Twitch.tvchannel, or available to all if no channel is given.
twitchsubscriptions [username]
Import the Twitch.tv emotes available to a user given their loginname.
files [path]
Import all PNG files in the given directory (recursive), usingeach file name as a shortcode.
slack
Import all of the custom emoji from a Slack team. Get an API keyat https://api.slack.com/apps/.../oauth and export it in theSLACK_API_TOKEN
environment variable. Requires theslack-ruby-client gem.
discord
Import all of the custom emoji from a Discord server. Get a bottoken at https://discordapp.com/developers/applications/me/...and export it in the DISCORD_API_TOKEN
environment variable, andjoin the bot to your channel with the client IDhere.Requires the discordrb gem.
mastodon [base url]
Copy all custom emoji from an existing Mastodon instance, viaits public API.
hashflags [time]
Import all Twitter promoted hashtag emoji, limited to campaignsactive at the given date and time, or now if no time is given.
emojipack [path or url]
Import an "emojipack" YAML from the given URL or file path.Requires the safe_yaml gem.
import_emoji.rb --prefix tf --minsize 20x20 steamgame 440
Import Steam emotes for Team Fortress 2, and add a "tf" prefix toeach shortcode, and expand each image to 20x20 pixels
import_emoji.rb --match "^[a-zA-Z0-9_]{2,}$" --lower twitchchannel
Import Twitch.tv global emotes (but only with alphanumeric codes)and make the codes lowercase
import_emoji.rb --hide files monstrous_specification_0.1.0_png64/emoji/
Import all emoji from the (downloaded and extracted) MonstrousSpecification emoji set, but hide them from the picker by default.
NX二次开发 UFUN获得面最小半径 UF_MODL_ask_face_min_radii //获得面最小半径(任何面) bool AskFaceMinRadii(const tag_t face_tag, int &num_radii, double radii[2]) { double positions[6] = { 0.0 }, params[4] = { 0.0 }; num_r