emoji-chengyu
把成语转成 emoji 来猜谜的小玩具
可以用于中秋, 元宵猜灯谜
Usage
Cli
pip3 install emoji-chengyu
emoji-chengyu-cli
emoji-chengyu-cli --count 20
# 游戏模式
emoji-chengyu-cli --game
例子
披麻戴孝 🍺🦄🦘🎓
走石飞沙 🏃🦁☕👙
立马万言 🌰🦄🎃👁
一苇可航 🥼🍤👍👩🚀
飞沙走砾 ☕👙🏃🌰
诸子百家 🐷🍆🥬👩👩👦
三山五岳 🌂⚡🕺🌕
左思右想 👈🤔👉🤔
指手点脚 💅🤚👩💻🦶
Libary
from emoji_chengyu.puzzle import gen_puzzle
for p in gen_puzzle():
print(p.puzzle_str, p.chengyu_item.word)
起因
春节有朋友在微信发的谜题
原理
成语 --> 拼音 && Emoji --> 含义 --> 拼音
利用同音或者谐音, 通过拼音关联成语和 Emoji
Example:
喜上眉梢 <---> 😄👆🌹🔥
- 😄 --> 高兴 --> 喜
- 👆 --> 向上 --> 上
- 🌹 --> 玫瑰 --> 玫(眉)
- 🔥 --> 火焰 --> 烧(梢)
数据源
- 成语
搜了下 github 有中华新华字典数据库 https://github.com/pwxcoo/chinese-xinhua MIT
而且包含了成语的拼音
- emoji
emoji 转中文搜了下,有好几个
-
https://github.com/Kenshin/emoji
是个 Chrome 插件, 数据源在 https://github.com/Kenshin/emoji/blob/master/src/vender/emoji/zh_emoji.js , MIT 证书
-
https://github.com/chroming/ch2emoji
python 数据源在 https://github.com/chroming/ch2emoji/blob/master/emoji_pinyin_dict.py , 看不太懂。 无证书
-
https://github.com/binderclip/emoji-cn
未完成的项目
-
https://github.com/techkang/zh2emoji
好像和 ch2emoji 的数据源一样, https://github.com/techkang/zh2emoji/blob/master/emoji_dict_sim.py 作者说做了谷歌翻译
-
https://github.com/gingerbeardman/Emojipedia
英文 https://github.com/gingerbeardman/Emojipedia/blob/master/Emoji.xml
-
https://github.com/notwaldorf/emoji-translate
英文, https://github.com/notwaldorf/emoji-translate/blob/master/extension/emojis.json (有点意思, 将来可以做一个抽象话生成器)
-
https://github.com/muan/emojilib
英文, 这个不错,感觉可以在这个基础上用谷歌翻译
TODO
- make an easy web
Metadata
Release files for emoji-chengyu 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| emoji_chengyu-0.0.6.tar.gz | 476.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emoji_chengyu-0.0.6-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 969.4 kB
Release files / emoji_chengyu-0.0.6.tar.gz
| Download URL | emoji_chengyu-0.0.6.tar.gz |
|---|---|
| Size | 476.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
568657d61131e811a505b76dc74880ab3e6908ee3cc403f88ef49c45b964e281
|
|
BLAKE2b-256 checksum How to use checksums |
122a0840f7b53319d11bc8d6b1b9fa0ea83e08eff0e440ce397d403a75973fa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / emoji_chengyu-0.0.6-py2.py3-none-any.whl
| Download URL | emoji_chengyu-0.0.6-py2.py3-none-any.whl |
|---|---|
| Size | 493.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
77f3a0d1328a2cda203ca0d8ccc3c2d0dceb1c8aa413605aba54d5652861187b
|
|
BLAKE2b-256 checksum How to use checksums |
342dfcccb068e994bb230f0b109e144570ee014e0abd8445f9e27f9ffc4be435
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for emoji-chengyu 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.