A playground project that uses swift-parsing for parsing emojis from unicode.org.
-
UnicodeEmojiModelsmodule provides swift representations for emojis -
UnicodeEmojiParsermodule includesEmojiSourceAPIClientthat can fetch unparsed fileEmojiAPIClientthat can fetch latest emojis and parse them- Uses
EmojiSourceAPIClient.defaultby default - Uses
UnicodeEmojiSourceParserby default
- Uses
UnicodeEmojiSourceParserthat can parse contents of file provided by unicode.org
-
UnicodeEmojiParserCLImodule producesunicode-emoji-parserexecutableunicode-emoji-parser versionprints versionunicode-emoji-parser fetch --output="<output_path>"can fetch file to a local destinationunicode-emoji-parser generate --input="<local_file>" --output="<output_file>"will generate a swift file with emoji declarations from a local file--input="<local_file>"can be omitted, in that case it will fetch latest emojis before generating declarations- It supports multiple styles
--style=groupedis default, generates an ordered dictionary of groupped emojis--style=emojisgenerates an array of emojis with embedded skin tones--style=valuesgenerates an array of plain emoji values
-
UnicodeEmojiPrintermodule is a core ofunicode-emoji-parsergeneration, it contains printers that can convert parsed data to strings, it includesCurrently it only supports swift
Since it's just a playground, this package doesn't provide much infrastructure/prebuilt executables, maybe in the future it'll provide more configuration for the cli, spm plugins, more formats etc. but no promises from my side 💁♂️