Skip to content

Instantly share code, notes, and snippets.

@Green-Sky
Last active December 20, 2024 13:52
Show Gist options
  • Save Green-Sky/360e0e63e9ed56a67d988f4752f415f5 to your computer and use it in GitHub Desktop.
Save Green-Sky/360e0e63e9ed56a67d988f4752f415f5 to your computer and use it in GitHub Desktop.
[DRAFT] StickerPack spec v1

Spec for StickerPacks (v1) [Draft]

This spec describes the file format for a collection of stickers. Stickers are image files, that represent a blown up and more dominant version of an emoji.

A StickerPack does not contain the sticker images itself, it only contains unique Identifiers, hashes of said sticker image files.

TODO: link to sticker spec

File structure

The file is a utf-8, newline-delimited text file.

The first line contains the magic and version. eg.:

STICKERPACK V1

Every following line is a sticker, structued as follows:

  • unique ID of sticker image file
  • followed by a single space
  • followed by a comma seperated list of replacement/alternative characters/text

The replacement chars are usually emojies, that can be displayed alternativly (if image display is not supported or not available) or full words. It can not contain newlines or commas (for obvious reasons). eg.:

15715d3f1e90a57cc887a05776c1405a0e501366aae8f53e1413182c68ba398604bfa081f173971752e3109b43ec0fa53da1f83c8aaebd4381f72ad662ecdc39 😒,green,instruct bot
7e9340e06af51565227863a82db66f0c93b98548129c12385810b3f376e655a14efdab70e8c7e372c82b99cc8dac4a46af9c9523724f8e9831b7216154695fbc πŸ§‘β€πŸ’»,πŸ”₯,ux lession,programmer art

The hash of the file, first line excluded, is the StickerPacks unique Identifier. eg for the file using the examples here: 9975f452d136f9ac3f8458f6b92112070b9b7a753f2e5b5befa29b87e70a8d9383f8223a4b7e08ba7400186d8e2fa12f3a37d8ca44b7bc4a1d46db0e461de290 TODO: which hash, sha512?

Recommendations

It is recommended that as many as possible image fileformats are supported. Animations as well. This spec does not require any one image format to be supported, however for some clients, there might be image formats required, which would overrule this spec.

for tox

Same as for Stickers, StickerPacks are identified by their own file_kind enum value and self hash as ID.

STICKERPACK V1
15715d3f1e90a57cc887a05776c1405a0e501366aae8f53e1413182c68ba398604bfa081f173971752e3109b43ec0fa53da1f83c8aaebd4381f72ad662ecdc39 😒,green,instruct bot
7e9340e06af51565227863a82db66f0c93b98548129c12385810b3f376e655a14efdab70e8c7e372c82b99cc8dac4a46af9c9523724f8e9831b7216154695fbc πŸ§‘β€πŸ’»,πŸ”₯,ux lession,programmer art
@Green-Sky
Copy link
Author

TODO:

  • title
  • author
  • "cover", id of the sticker serving as a cover image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment