{"id":14110176,"url":"https://github.com/impiaaa/mastodon_import_emoji","last_synced_at":"2025-04-23T18:05:31.104Z","repository":{"id":145048311,"uuid":"108691111","full_name":"impiaaa/mastodon_import_emoji","owner":"impiaaa","description":"Import Mastodon custom emoji from various places on the internet","archived":false,"fork":false,"pushed_at":"2018-11-18T19:46:19.000Z","size":31,"stargazers_count":30,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T18:05:17.418Z","etag":null,"topics":["emoji","mastodon"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/impiaaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-28T23:19:55.000Z","updated_at":"2025-02-02T00:15:36.000Z","dependencies_parsed_at":"2023-09-24T12:53:32.852Z","dependency_job_id":null,"html_url":"https://github.com/impiaaa/mastodon_import_emoji","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.09677419354838712,"last_synced_commit":"1862787c09d0806eea276978112e81a939270ff2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impiaaa%2Fmastodon_import_emoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impiaaa%2Fmastodon_import_emoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impiaaa%2Fmastodon_import_emoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impiaaa%2Fmastodon_import_emoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/impiaaa","download_url":"https://codeload.github.com/impiaaa/mastodon_import_emoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487530,"owners_count":21438612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emoji","mastodon"],"created_at":"2024-08-14T10:02:42.102Z","updated_at":"2025-04-23T18:05:31.085Z","avatar_url":"https://github.com/impiaaa.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Mastodon custom emoji importer\n\n## Usage\nRun from inside your Mastodon (\"live\") directory:\n`bundle exec rails runner import_emoji.rb [options] [command]`\n\n### Options\n`--prefix [prefix]`\n\tPrefix shortcodes of all imported emoji with a string\n\n`--dry-run`\n\tDon't actually save anything to the database\n\n`--match [regexp]`\n\tOnly import emoji with shortcodes that match the given regular\n\texpression\n\n`--lower`\n\tConvert all shortcodes to lowercase\n\n`--square`\n\tAdd padding to images to ensure a 1:1 aspect ratio\n\n`--minsize`\n\tImages smaller than this size (format WxH) are padded to be this\n\tsize\n\n`--hide`\n\tHide imported emoji from the emoji picker\n\n`--no-overwriting`\n\tBy default, the script will remove any custom emoji with the\n\tsame shortcode as a new one before adding the new one. This\n\tdisables that functionality, and will not import any\n\temoji with conflicting shortcodes.\n\n`--convert-gif`\n\tConvert animated GIF to animated PNG. Requires gif2apng to be\n\tinstalled.\n\n### Commands\n`steamgame [appid|title]`\n\tImport all emotes from a Steam game, either given its numeric\n\tAppID, or the (start of) the game name. Requires the nokogiri\n\tRuby gem.\n\n`steamprofile [steam64id]`\n\tImport all Steam emotes available to a user given their profile\n\tID (find that [here](http://steamid.co/)).\n\n`twitchchannel [channel]`\n\tImport the emotes available to subscribers of the given Twitch.tv\n\tchannel, or available to all if no channel is given.\n\n`twitchsubscriptions [username]`\n\tImport the Twitch.tv emotes available to a user given their login\n\tname.\n\n`files [path]`\n\tImport all PNG files in the given directory (recursive), using\n\teach file name as a shortcode.\n\n`slack`\n\tImport all of the custom emoji from a Slack team. Get an API key\n\tat https://api.slack.com/apps/.../oauth and export it in the\n\t`SLACK_API_TOKEN` environment variable. Requires the\n\tslack-ruby-client gem.\n\n`discord`\n\tImport all of the custom emoji from a Discord server. Get a bot\n\ttoken at https://discordapp.com/developers/applications/me/...\n\tand export it in the `DISCORD_API_TOKEN` environment variable, and\n\tjoin the bot to your channel with the client ID\n\t[here](https://discordapi.com/permissions.html#1073741824).\n\tRequires the discordrb gem.\n\n`mastodon [base url]`\n\tCopy all custom emoji from an existing Mastodon instance, via\n\tits public API.\n\n`hashflags [time]`\n\tImport all Twitter promoted hashtag emoji, limited to campaigns\n\tactive at the given date and time, or now if no time is given.\n\n`emojipack [path or url]`\n\tImport an \"emojipack\" YAML from the given URL or file path.\n\tRequires the safe_yaml gem.\n\n### Examples\n`import_emoji.rb --prefix tf --minsize 20x20 steamgame 440`\n\tImport Steam emotes for Team Fortress 2, and add a \"tf\" prefix to\n\teach shortcode, and expand each image to 20x20 pixels\n\n`import_emoji.rb --match \"^[a-zA-Z0-9_]{2,}$\" --lower twitchchannel`\n\tImport Twitch.tv global emotes (but only with alphanumeric codes)\n\tand make the codes lowercase\n\n`import_emoji.rb --hide files monstrous_specification_0.1.0_png64/emoji/`\n\tImport all emoji from the (downloaded and extracted) Monstrous\n\tSpecification emoji set, but hide them from the picker by default.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpiaaa%2Fmastodon_import_emoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimpiaaa%2Fmastodon_import_emoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpiaaa%2Fmastodon_import_emoji/lists"}