Command line frontend for the cihai CJK language library
Project description
cihai-cli - 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]
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: tú
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
poetry is a required package to develop.
git clone https://github.com/cihai/cihai-cli.git
cd cihai-cli
poetry install -E "docs test coverage lint format"
Makefile commands prefixed with watch_
will watch files and rerun.
Tests
poetry run py.test
Helpers: make test
Rerun tests on file change: make watch_test
(requires entr(1))
Documentation
Default preview server: http://localhost:8037
cd docs/
and make html
to build. make serve
to start http server.
Helpers: make build_docs
, make serve_docs
Rebuild docs on file change: make watch_docs
(requires
entr(1))
Rebuild docs and run server via one terminal: make dev_docs
(requires
above, and a make(1)
with -J
support, e.g. GNU Make)
Formatting / Linting
The project uses black and isort (one after the other) and runs flake8 via CI. See the configuration in pyproject.toml and `setup.cfg`:
make black isort
: Run black
first, then isort
to handle import
nuances make flake8
, to watch (requires entr(1)
):
make watch_flake8
Releasing
As of 0.6, poetry handles virtualenv creation, package requirements, versioning, building, and publishing. Therefore there is no setup.py or requirements files.
Update __version__ in __about__.py and `pyproject.toml`:
git commit -m 'build(cihai-cli): Tag v0.1.1'
git tag v0.1.1
git push
git push --tags
poetry build
poetry deploy
Quick links
- Usage
- Python API
- 2017 roadmap
- Python support: >= 3.6, pypy
- Source: https://github.com/cihai/cihai-cli
- Docs: https://cihai-cli.git-pull.com
- Changelog: https://cihai-cli.git-pull.com/history.html
- API: https://cihai-cli.git-pull.com/api.html
- Issues: https://github.com/cihai/cihai-cli/issues
- Test coverage https://codecov.io/gh/cihai/cihai-cli
- pypi: https://pypi-hypernode.com/pypi/cihai-cli
- OpenHub: https://www.openhub.net/p/cihai-cli
- License: MIT
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
File details
Details for the file cihai-cli-0.8.0.tar.gz
.
File metadata
- Download URL: cihai-cli-0.8.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.7.9 Linux/4.19.128-microsoft-standard
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6239ff00832422aacbc705a2a7ee5e571c62f2b9d8635ec06457ce849522f82f |
|
MD5 | 07af2e23df23e30627e66845e9e8ba51 |
|
BLAKE2b-256 | 2eab6e14eabb0dcfd4c5ed2cf8711f1bb4ecf4dc5c0ff63fccbfa38e16887510 |
File details
Details for the file cihai_cli-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: cihai_cli-0.8.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.7.9 Linux/4.19.128-microsoft-standard
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c792148a45fc8dcd4f15ee4217889713a0508c0bdeee9e240e933a42125bed |
|
MD5 | 2efdd527e65ff7cb62a3898a312a857c |
|
BLAKE2b-256 | 344df768ce2d65d505e8a3b34dfa0bf91aae796faa610520fdd96a52188adcf9 |