将emoji别名(例如:sparkling_heart:)替换为emoji原始字符。
pyemojif的Python项目详细描述
将emoji别名替换为emoji原始字符。简单但甜蜜 :微笑:
安装
$ pip install pyemojify
用法
cli
使用pyemojify -t text,例如:
$ pyemojify -t "Life is short :smile: , use :sparkles: Python :sparkles:" Life is short ? , use ✨ Python ✨.
pyemojify还支持管道,例如:
$ echo "Life is short :smile: , use :sparkles: Python :sparkles:" | pyemojify Life is short ? , use ✨ Python ✨.
这个对于git提交消息非常有用,使用下面的一个 你会再次见到你的情感朋友!
$ git log --oneline --color | pyemojify | less
api
>>> from pyemojify import emojify >>> text = emojify("Life is short :smile: , use :sparkles: Python :sparkles:") >>> print(text) Life is short ? , use ✨ Python ✨.
许可证
麻省理工学院