cambridge is a terminal version of Cambridge Dictionary.
Project description
Cambridge
cambridge
is a terminal version of Cambridge Dictionary, whose source is from https://dictionary.cambridge.org; also supports the Merriam-Webster Dictionary as backup.
Screenshots
Look up Cambridge Dictionary (screenshot on DARK terminal background)
Look up Merriam-Webster Dictionary (screenshot on LIGHT terminal background)
Highlights
camb <word/phrase>
to look up in Cambridge Dictionary by defaultcamb -c <word/phrase>
to look up in Cambridge Dictionary with additional Chinese translationcamb -w <word/phrase>
to look up in Merriam-Webster Dictionary- support concurrent searching multiple words from one dictionary, or multiple words from different dictionaries
- less than 2s taken to do all the work for the word, including fetching, parsing, printing, and writing cache
- less than 0.1s for the same word's later search by retrieving cache
- only the first dictionary from Cambridge (assuming the optimal) to avoid being confused by multiple dictionaries
- a list of suggestions will be given, if not found
camb l
to list cached words and phrases- support checking "Word of the Day" from Merriam-Webster Dictionary
- support displaying spellcheck suggestion list, cache list, Webster's all of word of the days by
fzf
- if
fzf
not installed, the aforementioned lists have been formatted elaborately - well tuned to dark, light, blueish, grayish,
gruvbox
terminal colorschemes
Install & Uninstall
pip install cambridge
pip uninstall -r requirements.txt -y
rm -rf $HOME/.cache/cambridge
rm -rf $HOME/.cache/fakeua
# within the project
make install
make uninstall
make clean_cache
Usages
Command s
(hidden)
For looking up words/phrases in a dictionary or multiple dictionaries.
camb <word/phrase>, <word/phrase>, ... # look up words/phrases in Cambridge Dictionary
camb -w <word/phrase>, <word/phrase>, ... # look up words/phrases in Merriam-Webster Dictionary
camb -c <word/phrase>, <word/phrase>, ... # look up words/phrases in Cambridge with Chinese translation
camb <w/p>, <w/p>, ... -w <w/p>, <w/p>, ... -c <w/p>, <w/p>, ... # concurrent searching
# Additional Options
--debug # look up words/phrases in debug mode
-f # look up words/phrases afresh without using cache
-n # look up words/phrases without showing suggestions if not found
# Special Characters on Terminal
# phrase with "'":
camb "a stone's throw" | camb a stone\'s throw
# phrase with "/":
camb "have your/its moments" | camb have your\/its moments
Command l
For listing and deleting items in the cache.
camb l # list alphabetically ordered words/phrases you've found before
camb l -t # list words/phrases in reverse chronological order
camb l -r # list 20 words/phrases from the word list randomly
camb l -d # delete one or more words/phrases(separated by ", ") from the list
Command wod
For displaying 'Word of the Day' in the Merriam Webster Dictionary
camb wod # list today's Word of the Day from Merriam-Webster Dictionary
camb wod -l # list all words of the day
General options
camb -h, --help # show this help message and exit
camb -v, --version # print the current version of the program
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
cambridge-3.13.9.tar.gz
(639.6 kB
view details)
Built Distribution
File details
Details for the file cambridge-3.13.9.tar.gz
.
File metadata
- Download URL: cambridge-3.13.9.tar.gz
- Upload date:
- Size: 639.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e69045ec92a45d1b97d1f6003f04a45cc6dc5c35d341791e4fe6f1aa63d832 |
|
MD5 | 115f4e0f4ee2b6d309d38a55dc8a7707 |
|
BLAKE2b-256 | d646e0f6c173e783f86c6d97bff947ec663b9a53f3aefaf42b0bbcd264b284ea |
File details
Details for the file cambridge-3.13.9-py3-none-any.whl
.
File metadata
- Download URL: cambridge-3.13.9-py3-none-any.whl
- Upload date:
- Size: 40.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97c8ad832639c6fcfa195ad7f9610a9b13180d36d8febcafc7dff82f246c083f |
|
MD5 | 732b9b939cbc32e1c4e23e1e327a15c3 |
|
BLAKE2b-256 | b665b06fe21938d438f13a5bf7818e490887632ff40169d8f9b4e28577ab23f8 |