A command line dictionary toolset.
Reason this release was yanked:
Mistakenly use typing hint from PyMuPDF, even though it is not required by default.
Project description
cmdict ·
cmdict
is a command-line dictionary toolset.
Installation
Use homebrew
:
brew install pasty-dev/cmdict/cmdict
or pip
:
pip install cmdict
How to Use
$ cmdict --help
Usage: cmdict [OPTIONS] COMMAND [ARGS]...
Command line interface.
Options:
--help Show this message and exit.
Commands:
download Download necessary database before using cmdict.
extract Extract highlighted words with specified color in a PDF file.
scan Scan all words in a txt file and return search results.
search Type in one English word and echo its Chinese translation.
To echo Chinese translation for one or multiple English words.
$ cmdict search apple
--------
apple
phonetic: 'æpl
definition:
- n. fruit with red or yellow or green skin and sweet to tart crisp whitish flesh
- n. native Eurasian tree widely cultivated in many varieties for its firm rounded edible fruits
trans:
- n. 苹果, 家伙
- [医] 苹果
collins: 3
oxford: 1
bnc: 2446
frq: 2695
$ cmdict search apple banana
To extract highlighted words in blue of sample.pdf
:
$ cmdict extract sample.pdf --color blue
--------
apple
phonetic: 'æpl
definition:
- n. fruit with red or yellow or green skin and sweet to tart crisp whitish flesh
- n. native Eurasian tree widely cultivated in many varieties for its firm rounded edible fruits
trans:
- n. 苹果, 家伙
- [医] 苹果
collins: 3
oxford: 1
bnc: 2446
frq: 2695
Support
skywind3000/ECDICT
: a free English to Chinese dictionary database (英中双解词典数据库).
$ cmdict download
--------
Downloading the dictionary...
100%|████████████████████████| 217M/217M [00:29<00:00, 666MiB/s]
cmdict is ready to use!
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
cmdict-0.1.3.tar.gz
(8.7 kB
view details)
Built Distribution
cmdict-0.1.3-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file cmdict-0.1.3.tar.gz
.
File metadata
- Download URL: cmdict-0.1.3.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48d46a50547283a54589a8dfed5d72e1e9a6fdb8a7ad04799daf562351a619d6 |
|
MD5 | 9dfc92b22ce128e174efc0628c690f8d |
|
BLAKE2b-256 | 0e188726dcd8291aaaf251eb2ec993fa270a808eaca6443115b2888e4a0c55b9 |
File details
Details for the file cmdict-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: cmdict-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f35145c672e61342af49ce1be600302c0d0b071566908ce20fecf124ffac8d3 |
|
MD5 | 6f01840b179da551c2ca97f12acc9e83 |
|
BLAKE2b-256 | ac18346175de94ea9bc3e7e7582f6e3383fa58fde4d950bbd7f6a86174d9ea0e |