#webp #gif #png #svg #image

bin+lib emoji-crafter

a command line tool for automating emoji exports from svg, including animation

5 releases

0.1.3 Jun 28, 2022
0.1.2 Sep 13, 2021
0.1.1 Sep 12, 2021
0.1.0 Sep 12, 2021
0.0.0 Sep 10, 2021

#1946 in Command line utilities

Custom license

901 lines

emoji crafter

a command line tool for automating emoji exports from svg, including animation.


emoji crafter can be installed using cargo:

cargo install emoji-crafter

how it works

to create a new emojiset project, just use the new command and provide the path/name for your project:

emoji new my-emojis

then change into the new project directory that the command created.

to export your emojiset run either:

emoji build # to build once
emoji watch # to build on file change

manifest format

the emojiset manifest file (emoji.toml), used for defining what assets are used by the project, and what will be exported at build time.

# human readable name for the project
name = "my emojis"
# the main svg file that contains
# emoji to be exported
document = "emojiset.svg"
# editor stylesheet, imported in the
# document and only used for styling
# while editing
stylesheet = "emojiset.css"

# human readable name for the theme
name = "my emojis"
# all files exported using this
# theme will have their filenames
# prefixed with this
prefix = ""
# stylesheet used for rendering
# emoji for the theme
stylesheet = "themes/my emojis.css"

# not all platforms work well with
# emoji that aren't square, so the
# option to trim is disabled
trim = false
directory = "original"

# some platforms work best with the
# transparent parts cropped from
# the emoji
trim = true
directory = "trimmed"

in addition to what's defined on project creation, you can also define templates to render text files:

# path to the template
input = "my template.tpl"
# where the template should be saved
output = "my document.md"

you can use tinytemplate syntax to build your templates.

emojiset format

each emoji is a group that has a desc which contains some toml describing how that group should be exported. for a static image emoji, it looks like:

type = "image"
# name of the emoji, prefixed with
# a theme name on export
name = "bunne"

animations are much the same:

type = "animation"
name = "bunnehop"

however they also contain groups which make up the individual frames of the animation:

type = "frame"
# delay before the next frame in ms
delay = 60
# animation timeline position
position = 1

yes i am allergic to capital letters, no i will not spell bunne correctly


~388K SLoC