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.32.0.tar.gz (261.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.32.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cihai_cli-0.32.0.tar.gz
Algorithm Hash digest
SHA256 a61b4555c257c650a1d1215eff376ed10cd6f19d9ee896400425a249a1e1d215
MD5 1cd629f2cf1fb31bb2243dc5a275cf4e
BLAKE2b-256 d510e84f6b971c1dbe0a3c0fc9d53e50f4fb4910230c820cc60213c34534359b

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for cihai_cli-0.32.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbc75f9b467947a8437618f66cd7d32b20f51dbed7968d06cd745ebd6b566014
MD5 159c5df5ad2cebcf03edd908ebb8ac5b
BLAKE2b-256 f80f4a385dc74a06164de6e5890f85e41e97ff9165abfad22e7900a35a4c21e9

See more details on using hashes here.

Provenance

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