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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3519d1bffe6441b860bccad9eb2a60d356f5dac6c88442ca01c85645441aa9c1
|
|
| MD5 |
c449ccf9c455e4daf2f61b08c59a1283
|
|
| BLAKE2b-256 |
90b297ec11d3b15f7f9537c79772b4faee5d366c73a013dceb2ec3cbd038022f
|
Provenance
The following attestation bundles were made for chengyu_cli-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on KaiyueLi-Bruce/chengyu-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chengyu_cli-0.1.1.tar.gz -
Subject digest:
3519d1bffe6441b860bccad9eb2a60d356f5dac6c88442ca01c85645441aa9c1 - Sigstore transparency entry: 1237901735
- Sigstore integration time:
-
Permalink:
KaiyueLi-Bruce/chengyu-cli@67235dec88e4376ef83ba0f9e8af972f35dfee68 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/KaiyueLi-Bruce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@67235dec88e4376ef83ba0f9e8af972f35dfee68 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7efddcf82791f291cf8519e0c2c756af6dd918c10839a46247c62b3bd7ea5b8
|
|
| MD5 |
f4f7d1189d802439dc97ab394db48d4b
|
|
| BLAKE2b-256 |
ced54148cfef52b40144433082b4af415ecf60c481aa67b7903cee73f5a0e3da
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chengyu_cli-0.1.1-py3-none-any.whl -
Subject digest:
c7efddcf82791f291cf8519e0c2c756af6dd918c10839a46247c62b3bd7ea5b8 - Sigstore transparency entry: 1237901750
- Sigstore integration time:
-
Permalink:
KaiyueLi-Bruce/chengyu-cli@67235dec88e4376ef83ba0f9e8af972f35dfee68 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/KaiyueLi-Bruce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@67235dec88e4376ef83ba0f9e8af972f35dfee68 -
Trigger Event:
push
-
Statement type: