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.31.0.tar.gz (194.0 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.31.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cihai_cli-0.31.0.tar.gz
Algorithm Hash digest
SHA256 f3747d1070f07783973f847a4cef7ced403c68dfbf387a48780e304f12e78c49
MD5 efba2fb5aa0b77c8fd6efc5f7dfdadba
BLAKE2b-256 122b97922f5f2296926258936c7bc3ed5ce0060afee22adfbff09316b480388f

See more details on using hashes here.

File details

Details for the file cihai_cli-0.31.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cihai_cli-0.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a33f3e4d0137ef2fc05269737f44ccb7621fac3e438727f1423c178df1307a4
MD5 0dc8e9336d6ad5d55efcf0c39a679a02
BLAKE2b-256 c7da2beaef341f5aff8dc395c3e610ad346ad7918c61a99956a94ba4f18245ad

See more details on using hashes here.

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