Skip to main content

A CLI tool to learn Chinese idioms with translations

Project description

🀄 Chengyu CLI

A command-line tool to learn Chinese idioms (成语) with translations powered by DeepL.

Every time you run chengyu, you get a random idiom with its pinyin and explanation in your preferred language.

Installation

pip install chengyu-cli

Setup

On first run, you will be guided through a quick setup:

chengyu

If you choose any language other than Chinese, you will need a free DeepL API key. Get one at: https://www.deepl.com/pro-api (choose the Free plan)

Usage

chengyu                    # Show next idiom in your default language
chengyu japanese           # Override language for this run only
chengyu --change french    # Change your default language
chengyu --add-key          # Add or update your DeepL API key
chengyu --setup            # Redo the initial setup
chengyu --help             # Show help

Supported Languages

Chinese, English, Japanese, French, German, Spanish, Italian, Korean, Portuguese, Russian, Dutch, Polish

How It Works

  • Idioms are stored locally — no internet needed to fetch them
  • Chinese output requires no API key
  • All other languages are translated via the DeepL API
  • The next idiom is preloaded in the background so display is instant

Credits

Idiom data sourced from chinese-xinhua (MIT License)

Auto Publish to PyPI

This project is configured to auto-publish to PyPI via GitHub Actions on tags like v0.1.1.

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

chengyu_cli-0.1.1.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chengyu_cli-0.1.1-py3-none-any.whl (3.7 MB view details)

Uploaded Python 3

File details

Details for the file chengyu_cli-0.1.1.tar.gz.

File metadata

  • Download URL: chengyu_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chengyu_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3519d1bffe6441b860bccad9eb2a60d356f5dac6c88442ca01c85645441aa9c1
MD5 c449ccf9c455e4daf2f61b08c59a1283
BLAKE2b-256 90b297ec11d3b15f7f9537c79772b4faee5d366c73a013dceb2ec3cbd038022f

See more details on using hashes here.

Provenance

The following attestation bundles were made for chengyu_cli-0.1.1.tar.gz:

Publisher: publish-pypi.yml on KaiyueLi-Bruce/chengyu-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chengyu_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: chengyu_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chengyu_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7efddcf82791f291cf8519e0c2c756af6dd918c10839a46247c62b3bd7ea5b8
MD5 f4f7d1189d802439dc97ab394db48d4b
BLAKE2b-256 ced54148cfef52b40144433082b4af415ecf60c481aa67b7903cee73f5a0e3da

See more details on using hashes here.

Provenance

The following attestation bundles were made for chengyu_cli-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on KaiyueLi-Bruce/chengyu-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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