Skip to main content

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:

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

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

数据源

  1. 成语

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

而且包含了成语的拼音

  1. emoji

emoji 转中文搜了下,有好几个

TODO

  1. 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)

Source distribution for emoji-chengyu 0.0.6
File Size Uploaded Provenance
emoji_chengyu-0.0.6.tar.gz 476.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for emoji-chengyu 0.0.6
File Interpreter ABI Platform
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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page