提供表情符号注释数据
emojitations的Python项目详细描述
#情绪化
使用Unicode表情符号注释的库。emoji注释可以为脚本提供一种简单的方法 解释表情符号,或者随机选择一个满足特定条件的表情符号。此处列出了注释 Unicode网站:http://unicode.org/emoji/charts/full-emoji-list.html
##要求
- Python3.+
这个库是纯python 3,没有其他需求。
##安装
python3 setup.py安装
##用法
emoji可以在emoji.whatever上以他们的名义使用。这些对象包括一个注释集 使用emoji属性或str()获取它们的emoji字符串。若要获取批注中的所有表情符号,请使用 emoji.annotation.whatever。这将返回冻结的集合,然后可以使用集合操作组合这些集合。
该库还为外语提供(初步)支持,例如emoji.de.kreditkarte。
有关详细信息,请参见下面的示例。
`python >>> from emojitations import emoji >>> emoji.grinning_face.annotations frozenset({'grin','face'}) >>> print(''.join(str(grin) for grin in emoji.annotation.grin)) ??? >>> print(''.join(str(grin) for grin in emoji.annotation.grin & emoji.annotation.cat)) ? >>> print(str(emoji.de.kreditkarte)) ? `
0.1.0(2016-03-17)
- 初始开发版本。