Skip to main content

把成语转成 emoji 来猜谜的小玩具, 可以用于中秋, 元宵猜灯谜

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emoji_chengyu-0.0.6.tar.gz (476.1 kB view details)

Uploaded Source

Built Distribution

emoji_chengyu-0.0.6-py2.py3-none-any.whl (493.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file emoji_chengyu-0.0.6.tar.gz.

File metadata

  • Download URL: emoji_chengyu-0.0.6.tar.gz
  • Upload date:
  • Size: 476.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for emoji_chengyu-0.0.6.tar.gz
Algorithm Hash digest
SHA256 568657d61131e811a505b76dc74880ab3e6908ee3cc403f88ef49c45b964e281
MD5 3fda92d4472a04b29b0cc6fb98b423a9
BLAKE2b-256 122a0840f7b53319d11bc8d6b1b9fa0ea83e08eff0e440ce397d403a75973fa5

See more details on using hashes here.

File details

Details for the file emoji_chengyu-0.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for emoji_chengyu-0.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 77f3a0d1328a2cda203ca0d8ccc3c2d0dceb1c8aa413605aba54d5652861187b
MD5 4ba7d2501eae04de425b4a8dafc1ced5
BLAKE2b-256 342dfcccb068e994bb230f0b109e144570ee014e0abd8445f9e27f9ffc4be435

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page