gts_emoji_importer

An Emoji Importer for GoToSocial

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 0.1.3
License GPLv3
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:26

Authors

  • Paul Wilde

Installation

nimble install gts_emoji_importer
choosenim install gts_emoji_importer
git clone https://codeberg.org/pswilde/gts_emoji_importer

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
gts_emoji_importer - - - - - - -

Dependencies

Package Version Optional
nim >= 2.0.0 No
fedi_auth >= 0.1.0 No

README

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