https://github.com/maximkrouk/unicode-emoji-parser
Parser for https://unicode.org/public/emoji/latest/emoji-test.txt
https://github.com/maximkrouk/unicode-emoji-parser
Last synced: 3 months ago
JSON representation
Parser for https://unicode.org/public/emoji/latest/emoji-test.txt
- Host: GitHub
- URL: https://github.com/maximkrouk/unicode-emoji-parser
- Owner: maximkrouk
- License: mit
- Created: 2024-11-25T14:01:12.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-25T21:08:34.000Z (7 months ago)
- Last Synced: 2025-01-28T18:44:10.353Z (5 months ago)
- Language: Swift
- Size: 363 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unicode-emoji-parser
A playground project that uses [`swift-parsing`](https://github.com/pointfreeco/swift-parsing) for parsing [`emojis from unicode.org`]("https://unicode.org/public/emoji/latest/emoji-test.txt").
- **`UnicodeEmojiModels`** module provides swift representations for emojis
- **`UnicodeEmojiParser`** module includes
- `EmojiSourceAPIClient` that can fetch unparsed file
- `EmojiAPIClient` that can fetch latest emojis and parse them
- Uses `EmojiSourceAPIClient.default` by default
- Uses `UnicodeEmojiSourceParser` by default
- `UnicodeEmojiSourceParser` that can parse contents of file provided by unicode.org- **`UnicodeEmojiParserCLI`** module produces `unicode-emoji-parser` executable
- `unicode-emoji-parser version` prints version
- `unicode-emoji-parser fetch --output=""` can fetch file to a local destination
- `unicode-emoji-parser generate --input="" --output=""` will generate a swift file with emoji declarations from a local file
- `--input=""` can be omitted, in that case it will fetch latest emojis before generating declarations
- It supports multiple styles
- `--style=grouped` is default, generates an ordered dictionary of groupped emojis
- `--style=emojis` generates an array of emojis with embedded skin tones
- `--style=values` generates an array of plain emoji values- **`UnicodeEmojiPrinter`** module is a core of `unicode-emoji-parser` generation, it contains printers that can convert parsed data to strings, it includes
> Currently 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 💁♂️