No description
Find a file
2025-09-24 12:59:40 +02:00
bin fixes #1 : Incompatibility with GoToSocial 0.19 2025-04-22 20:40:43 +01:00
src fixes #1 : Incompatibility with GoToSocial 0.19 2025-04-22 20:40:43 +01:00
.gitignore added binary to root for the moment 2023-09-27 16:51:28 +01:00
Containerfile added containerfile - working at docker.io/pswilde/gts_emoji_importer 2023-09-27 17:46:07 +01:00
gts_emoji_importer.nimble fixes #1 : Incompatibility with GoToSocial 0.19 2025-04-22 20:40:43 +01:00
license.md added license 2023-09-27 17:15:38 +01:00
nim.cfg first 2023-09-26 14:03:30 +01:00
readme.md add dependencies note 2025-09-24 12:59:40 +02:00

GoToSocial Emoji Importer

This tool gets emojis either from a remote instance or a local directory.
Emojis must be either a png or gif and less than your emoji_size_limit variable on your instance.
Your current custom emojis are checked and compared against imported/remote ones and will skip any that already exist.
Custom Emojis will not be overwritten if they have the same name. To overwrite an emoji, you must delete it from your instance manually first.

Tested with GoToSocial as a home instance and Mastodon, Pleroma, Akkoma as remote instances but should in theory work with any remote instance that publishes their custom_emojis on /api/v1/custom_emojis

Dependencies

The nim programming language and its included nimble packaging and building wrapper. You can install these by following the instructions at nim-lang.org/install.html.

Building

nimble build

if fedi_auth is not found when building, use the following command to install it

nimble install https://codeberg.org/pswilde/fedi_auth
nimble build

Usage:

gts_emoji_importer --home=myinstance.com --remote=remote.com --ignore=blob

Authorization

If an auth token is not provided by the env var GTS_EMOJIS_AUTH_TOKEN, this tool will go through the authentication to get a token. You can save this token and assign the env var for subsequent runs, or just go through the auth process each time.

Options:

--steal Sets the mode to "Steal" mode - will get emojis from a remote instance
(default)

--import Sets the mode to "Import" mode - will get emojis from a local directory

--home= Specifies the Home instance - the one the emojis will be saved to
(required) You must be an admin of this instance.

--remote= Specifies the Remote instance = the one the emojis will come from
(required) Must be an instance that publishes their emojis on /api/v1/custom_emojis
Can be set multiple times

-d=, --dir= In Import mode, the local directory to get emojis from
(required for
import mode)

-c=, --category= The category to import emojis into.
(optional) In remote mode, if not set the category will be the domain name of the remote instance

-e=, --emoji= Specifies an exact emoji name if you only want one of them
(optional) Can be specified multiple times

-i=, --ignore= Specifies a text string to ignore, i.e. "blobcat" so you don't download unwanted emojis
(optional) Can be specified multiple times