emoji-chengyu


Nameemoji-chengyu JSON
Version 0.0.6 PyPI version JSON
download
home_page
Summary把成语转成 emoji 来猜谜的小玩具, 可以用于中秋, 元宵猜灯谜
upload_time2024-01-02 16:11:34
maintainer
docs_urlNone
author
requires_python
license
keywords chengyu emoji emoji-chengyu 成语
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # emoji-chengyu

把成语转成 emoji 来猜谜的小玩具

可以用于中秋, 元宵猜灯谜

## Usage

### Cli
```bash
pip3 install emoji-chengyu
```

```bash
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:

喜上眉梢 <---> 😄👆🌹🔥

1. 😄 --> 高兴 --> 喜
2. 👆 --> 向上 --> 上
3. 🌹 --> 玫瑰 --> 玫(眉)
4. 🔥 --> 火焰 --> 烧(梢)


## 数据源

1. 成语

搜了下 github 有中华新华字典数据库 https://github.com/pwxcoo/chinese-xinhua MIT

而且包含了成语的拼音

2. 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

1. make an easy web

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "emoji-chengyu",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "chengyu,emoji,emoji-chengyu,\u6210\u8bed",
    "author": "",
    "author_email": "alingse <alingse@foxmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/12/2a/0840f7b53319d11bc8d6b1b9fa0ea83e08eff0e440ce397d403a75973fa5/emoji_chengyu-0.0.6.tar.gz",
    "platform": null,
    "description": "# emoji-chengyu\n\n\u628a\u6210\u8bed\u8f6c\u6210 emoji \u6765\u731c\u8c1c\u7684\u5c0f\u73a9\u5177\n\n\u53ef\u4ee5\u7528\u4e8e\u4e2d\u79cb, \u5143\u5bb5\u731c\u706f\u8c1c\n\n## Usage\n\n### Cli\n```bash\npip3 install emoji-chengyu\n```\n\n```bash\nemoji-chengyu-cli\nemoji-chengyu-cli --count 20\n\n# \u6e38\u620f\u6a21\u5f0f\nemoji-chengyu-cli --game\n```\n\n\u4f8b\u5b50\n```\n\u62ab\u9ebb\u6234\u5b5d \ud83c\udf7a\ud83e\udd84\ud83e\udd98\ud83c\udf93\n\u8d70\u77f3\u98de\u6c99 \ud83c\udfc3\ud83e\udd81\u2615\ud83d\udc59\n\u7acb\u9a6c\u4e07\u8a00 \ud83c\udf30\ud83e\udd84\ud83c\udf83\ud83d\udc41\n\u4e00\u82c7\u53ef\u822a \ud83e\udd7c\ud83c\udf64\ud83d\udc4d\ud83d\udc69\u200d\ud83d\ude80\n\u98de\u6c99\u8d70\u783e \u2615\ud83d\udc59\ud83c\udfc3\ud83c\udf30\n\u8bf8\u5b50\u767e\u5bb6 \ud83d\udc37\ud83c\udf46\ud83e\udd6c\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\n\u4e09\u5c71\u4e94\u5cb3 \ud83c\udf02\u26a1\ud83d\udd7a\ud83c\udf15\n\u5de6\u601d\u53f3\u60f3 \ud83d\udc48\ud83e\udd14\ud83d\udc49\ud83e\udd14\n\u6307\u624b\u70b9\u811a \ud83d\udc85\ud83e\udd1a\ud83d\udc69\u200d\ud83d\udcbb\ud83e\uddb6\n```\n\n### Libary\n\n```\nfrom emoji_chengyu.puzzle import gen_puzzle\n\nfor p in gen_puzzle():\n    print(p.puzzle_str, p.chengyu_item.word)\n```\n\n## \u8d77\u56e0\n\n\u6625\u8282\u6709\u670b\u53cb\u5728\u5fae\u4fe1\u53d1\u7684\u8c1c\u9898\n\n## \u539f\u7406\n\n\u6210\u8bed --> \u62fc\u97f3 && Emoji --> \u542b\u4e49 --> \u62fc\u97f3\n\n\u5229\u7528\u540c\u97f3\u6216\u8005\u8c10\u97f3, \u901a\u8fc7\u62fc\u97f3\u5173\u8054\u6210\u8bed\u548c Emoji\n\nExample:\n\n\u559c\u4e0a\u7709\u68a2 <---> \ud83d\ude04\ud83d\udc46\ud83c\udf39\ud83d\udd25\n\n1. \ud83d\ude04 --> \u9ad8\u5174 --> \u559c\n2. \ud83d\udc46 --> \u5411\u4e0a --> \u4e0a\n3. \ud83c\udf39 --> \u73ab\u7470 --> \u73ab(\u7709)\n4. \ud83d\udd25 --> \u706b\u7130 --> \u70e7(\u68a2)\n\n\n## \u6570\u636e\u6e90\n\n1. \u6210\u8bed\n\n\u641c\u4e86\u4e0b github \u6709\u4e2d\u534e\u65b0\u534e\u5b57\u5178\u6570\u636e\u5e93 https://github.com/pwxcoo/chinese-xinhua MIT\n\n\u800c\u4e14\u5305\u542b\u4e86\u6210\u8bed\u7684\u62fc\u97f3\n\n2. emoji\n\nemoji \u8f6c\u4e2d\u6587\u641c\u4e86\u4e0b\uff0c\u6709\u597d\u51e0\u4e2a\n\n- https://github.com/Kenshin/emoji\n\n    \u662f\u4e2a Chrome \u63d2\u4ef6, \u6570\u636e\u6e90\u5728 https://github.com/Kenshin/emoji/blob/master/src/vender/emoji/zh_emoji.js , MIT \u8bc1\u4e66\n\n- https://github.com/chroming/ch2emoji\n\n    python \u6570\u636e\u6e90\u5728 https://github.com/chroming/ch2emoji/blob/master/emoji_pinyin_dict.py , \u770b\u4e0d\u592a\u61c2\u3002 \u65e0\u8bc1\u4e66\n\n- https://github.com/binderclip/emoji-cn\n\n    \u672a\u5b8c\u6210\u7684\u9879\u76ee\n\n- https://github.com/techkang/zh2emoji\n\n    \u597d\u50cf\u548c ch2emoji \u7684\u6570\u636e\u6e90\u4e00\u6837, https://github.com/techkang/zh2emoji/blob/master/emoji_dict_sim.py \u4f5c\u8005\u8bf4\u505a\u4e86\u8c37\u6b4c\u7ffb\u8bd1\n\n- https://github.com/gingerbeardman/Emojipedia\n\n    \u82f1\u6587 https://github.com/gingerbeardman/Emojipedia/blob/master/Emoji.xml\n\n- https://github.com/notwaldorf/emoji-translate\n\n    \u82f1\u6587, https://github.com/notwaldorf/emoji-translate/blob/master/extension/emojis.json (\u6709\u70b9\u610f\u601d, \u5c06\u6765\u53ef\u4ee5\u505a\u4e00\u4e2a\u62bd\u8c61\u8bdd\u751f\u6210\u5668)\n\n- https://github.com/muan/emojilib\n\n    \u82f1\u6587, \u8fd9\u4e2a\u4e0d\u9519\uff0c\u611f\u89c9\u53ef\u4ee5\u5728\u8fd9\u4e2a\u57fa\u7840\u4e0a\u7528\u8c37\u6b4c\u7ffb\u8bd1\n\n\n## TODO\n\n1. make an easy web\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "\u628a\u6210\u8bed\u8f6c\u6210 emoji \u6765\u731c\u8c1c\u7684\u5c0f\u73a9\u5177, \u53ef\u4ee5\u7528\u4e8e\u4e2d\u79cb, \u5143\u5bb5\u731c\u706f\u8c1c",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/alingse/emoji-chengyu"
    },
    "split_keywords": [
        "chengyu",
        "emoji",
        "emoji-chengyu",
        "\u6210\u8bed"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "342dfcccb068e994bb230f0b109e144570ee014e0abd8445f9e27f9ffc4be435",
                "md5": "4ba7d2501eae04de425b4a8dafc1ced5",
                "sha256": "77f3a0d1328a2cda203ca0d8ccc3c2d0dceb1c8aa413605aba54d5652861187b"
            },
            "downloads": -1,
            "filename": "emoji_chengyu-0.0.6-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4ba7d2501eae04de425b4a8dafc1ced5",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 493346,
            "upload_time": "2024-01-02T16:11:27",
            "upload_time_iso_8601": "2024-01-02T16:11:27.242238Z",
            "url": "https://files.pythonhosted.org/packages/34/2d/fcccb068e994bb230f0b109e144570ee014e0abd8445f9e27f9ffc4be435/emoji_chengyu-0.0.6-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "122a0840f7b53319d11bc8d6b1b9fa0ea83e08eff0e440ce397d403a75973fa5",
                "md5": "3fda92d4472a04b29b0cc6fb98b423a9",
                "sha256": "568657d61131e811a505b76dc74880ab3e6908ee3cc403f88ef49c45b964e281"
            },
            "downloads": -1,
            "filename": "emoji_chengyu-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "3fda92d4472a04b29b0cc6fb98b423a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 476092,
            "upload_time": "2024-01-02T16:11:34",
            "upload_time_iso_8601": "2024-01-02T16:11:34.033702Z",
            "url": "https://files.pythonhosted.org/packages/12/2a/0840f7b53319d11bc8d6b1b9fa0ea83e08eff0e440ce397d403a75973fa5/emoji_chengyu-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-02 16:11:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alingse",
    "github_project": "emoji-chengyu",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "emoji-chengyu"
}
        
Elapsed time: 0.22355s