emoji crafter
a command line tool for automating emoji exports from svg, including animation.
installation
emoji crafter can be installed using cargo:
how it works
to create a new emojiset project, just use the new
command and provide the path/name for your project:
then change into the new project directory that the command created.
to export your emojiset run either:
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
= "my emojis"
# the main svg file that contains
# emoji to be exported
= "emojiset.svg"
# editor stylesheet, imported in the
# document and only used for styling
# while editing
= "emojiset.css"
[[]]
# human readable name for the theme
= "my emojis"
# all files exported using this
# theme will have their filenames
# prefixed with this
= ""
# stylesheet used for rendering
# emoji for the theme
= "themes/my emojis.css"
[[]]
# not all platforms work well with
# emoji that aren't square, so the
# option to trim is disabled
= false
= "original"
[[]]
# some platforms work best with the
# transparent parts cropped from
# the emoji
= true
= "trimmed"
in addition to what's defined on project creation, you can also define templates to render text files:
[[]]
# path to the template
= "my template.tpl"
# where the template should be saved
= "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:
= "image"
# name of the emoji, prefixed with
# a theme name on export
= "bunne"
animations are much the same:
= "animation"
= "bunnehop"
however they also contain groups which make up the individual frames of the animation:
= "frame"
# delay before the next frame in ms
= 60
# animation timeline position
= 1
yes i am allergic to capital letters, no i will not spell bunne correctly