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.34.0.tar.gz (230.1 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.34.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cihai_cli-0.34.0.tar.gz
  • Upload date:
  • Size: 230.1 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.34.0.tar.gz
Algorithm Hash digest
SHA256 751a2311e91d7616694c4a9b77a44f2c4302c35180dd9343b5fdaf9f863ab2ae
MD5 f2f553f65a405835de4f220848a87302
BLAKE2b-256 12a328843d5d46eb5a6145cf4802f0bec1bcae96bc24b04d236a78f32013b67f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cihai_cli-0.34.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.34.0-py3-none-any.whl.

File metadata

  • Download URL: cihai_cli-0.34.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.34.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8b20ea2bc988f98ccae7d86e65d41d5695f1d0bd25fec91b9ba568d0625a342
MD5 b538759d72e2ebd61de912bf6fa03847
BLAKE2b-256 2594e51b1bd3a998c7dab01256c24aacaf9264fd5e3a7f1ed546d54f7200dda2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cihai_cli-0.34.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