Skip to main content

Command line frontend for the cihai CJK language library

Project description

cihai-cli · Python Package License Code Coverage

Command line interface to the cihai CJK-language library.

This project is under active development. Follow our progress and check back for updates!

Installation

$ pip install --user cihai-cli

Or manage it inside an existing project with uv:

$ uv add cihai-cli

Install the CLI as a user-wide tool with uv:

$ uv tool install cihai-cli

Run it on-demand without installing:

$ uvx --from cihai-cli cihai --version

Developmental releases

You can test the unpublished version of cihai-cli before its released.

  • pip:

    $ pip install --user --upgrade --pre cihai-cli
    
  • uv:

    $ uv tool install --prerelease=allow cihai-cli
    
    $ uv add --prerelease=allow cihai-cli
    
  • pipx:

    $ pipx install --suffix=@next cihai-cli --pip-args '\--pre' --include-deps --force
    

    Then use cihai@next info 好.

For more information see developmental releases

Character lookup

See CLI in the documentation for full usage information.

$ cihai info 
char: 
kCantonese: hou2 hou3
kDefinition: good, excellent, fine; well
kHangul: 
kJapaneseOn: KOU
kKorean: HO
kMandarin: hǎo
kTang: "*xɑ̀u *xɑ̌u"
kTotalStrokes: "6"
ucn: U+597D

Retrieve all character information (including book indices):

$ cihai info  -a
char: 
kCangjie: VND
kCantonese: hou2 hou3
kCihaiT: "378.103"
kDefinition: good, excellent, fine; well
kFenn: 552A
kFourCornerCode: "4744.7"
kFrequency: "1"
kGradeLevel: "1"
kHKGlyph: 0871
kHangul: 
kHanyuPinlu: hǎo(6060) hāo(142) hào(115)
kHanyuPinyin: 21028.010:hǎo,hào
kJapaneseKun: KONOMU SUKU YOI
kJapaneseOn: KOU
kKorean: HO
kMandarin: hǎo
kPhonetic: "481"
kRSAdobe_Japan1_6: C+1975+38.3.3 C+1975+39.3.3
kRSKangXi: "38.3"
kTang: "*xɑ̀u *xɑ̌u"
kTotalStrokes: "6"
kVietnamese: háo
kXHC1983: 0445.030:hǎo 0448.030:hào
ucn: U+597D

Reverse lookup

$ cihai reverse library
char: 
kCantonese: syu1
kDefinition: library
kJapaneseOn: TOSHOKAN SHO
kMandarin: 
kTotalStrokes: '13'
ucn: U+5715
--------
char: 
kCantonese: long4
kDefinition: the place where the supreme stores his books; library
kJapaneseOn: ROU
kMandarin: láng
kTotalStrokes: '11'
ucn: U+5ACF
--------

Developing

$ git clone https://github.com/cihai/cihai-cli.git
$ cd cihai-cli

Bootstrap your environment and learn more about contributing. We use the same conventions / tools across all cihai projects: pytest, sphinx, mypy, ruff, tmuxp, and file watcher helpers (e.g. entr(1)).

Python versions

  • Final Python 3.7 version: 0.16.0

Quick links

Docs Build Status

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

cihai_cli-0.33.0.tar.gz (229.9 kB view details)

Uploaded Source

Built Distribution

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

cihai_cli-0.33.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file cihai_cli-0.33.0.tar.gz.

File metadata

  • Download URL: cihai_cli-0.33.0.tar.gz
  • Upload date:
  • Size: 229.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cihai_cli-0.33.0.tar.gz
Algorithm Hash digest
SHA256 43e0d7025e5613ebe0e9004fd2f1a199e62fb15786ec67e7febf1938b4eb35aa
MD5 91151af2312dd3c98041e6d569a77f2c
BLAKE2b-256 6cff88f22a5a9139ac05e19a5af98ea85890ebb510b9b36abaa0ff42447453d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cihai_cli-0.33.0.tar.gz:

Publisher: tests.yml on cihai/cihai-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 cihai_cli-0.33.0-py3-none-any.whl.

File metadata

  • Download URL: cihai_cli-0.33.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cihai_cli-0.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 192803bf0c30153c97aad05b6377266571d66bd1d19e3fa4bd2e9114f1cb74f2
MD5 5029725e88ace34ffc3be507f3b3425d
BLAKE2b-256 ca3d96549862142c0610d60dadc624b2831ee0a6c69fc70fc74d13266df14b28

See more details on using hashes here.

Provenance

The following attestation bundles were made for cihai_cli-0.33.0-py3-none-any.whl:

Publisher: tests.yml on cihai/cihai-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