表情符号解析器与斯威夫特
表情符号解析器
世界上 92% 的在线人口在他们的交流中使用表情符号——Unicode 定义了使这些人际联系成为可能的字符。Unicode 表情符号小组委员会定期审查新表情符号的提案,并不时提供新版本。
您可以从此处找到所有版本的列表
https://unicode.org/Public/emoji/
此命令行工具将允许您指定其中一个版本(必须是 v4.0 或更高版本),并将生成一个 emoji.json 文件和可选的 Swift EmojiManager 类(感谢@jordibruin)和可在 SwiftUI 项目中使用的示例视图。
Building a Command Line Tool for Release
You can choose to fork or clone this repo and build and install the command line tool if you wish. You can find instructions for that at this point in the video that I created on building your own Command Line utilities
https://youtu.be/pQt71tLmiac?t=1073
Installing using Mint
One of the issues with sharing compiled applications for the mac is that they have to be notorized by Apple for security reasons and this can be, for a Command Line tool, an aduous task that I would prefer not to get into for this project. However, you can install direcly using Mint so that you will be able to use it.
Install Homebrew and Mint
Homebrew
This will require that you install Mint first using Homebrew. You can find out how to install Hombrew by going to the HomeBrew website.
https://brew.sh
Mint
Once Homebrew is installed, you can install Mint
brew install Mint
Installing emojiParser
You can now install emojiParser
mint install StewartLynch/emojiParser
Before you can effectively use emojiParser, you are going to have to make sure that the Mint directory where the installed command line tools are stored is in your /etc/paths location
-
Open terminal and open the paths file using nano
sudo nano /etc/paths
-
Add the path to the mint directory to that file. For example, I am logged in as slynch so that path is
/Users/slynch/.mint/bin
-
Save by issuing the commands ⌃O and then ⌃X to save and exit
-
Exit Terminal you should be good to go to continue with the following instructions
Basic Usage
Open terminal in any directory you like and then you can use the command line tool to generate the file(s) in that location.
Get help to show all options
emojiparser -h
Required
Generate the json file for a particular version (example 14.0)
emojiparser --ver 14.0
Optional
Generate the json file for a particular version (example 14.0) AND generate Jordi Bruin’s EmojiManager class
emojiparser --ver 14.0 -m
Generate the json file for a particular version (example 14.0) AND generate a sample EmojiPickerView
emojiparser --ver 14.0 -s
Generate the json file for a particular version (example 14.0) AND generate the EmojiManager class AND the sample EmojiPickerView
emojiparser --ver 14.0 -ms