Cambridge is a terminal version of Cambridge Dictionary.
Project description
Cambridge
Cambridge is a terminal version of Cambridge Dictionary.
The dictionary data comes from https://dictionary.cambridge.org
If you're not satisfied with the result, you can try with "-w" flag to look up the word in Merriam-Webster Dictionary.
Screenshots
Why This
I'm a terminal person tired of pulling out a GUI app or browser, inputting words in the search bar, hitting the search button and then waiting for the result to render with a bunch of unnecessary static files coming along. Not only is the time taken long, but also switching apps back and forth can be annoying. So I wrote this console application with features to my satisfaction.
Features
camb <word/phrase>
to look it up in Cambridge Dictionary by default.- '-w' flag to fetch Merriam-Webster Dictionary.
- 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.
- Fetch the first dictionary from Cambridge, avoiding confuses by multiple dictionaries.
- If not found, a list of related suggestions will be displayed.
camb l
to list words and phrases you've found before.
With fzf
camb l | fzf --preview 'camb {}'
, if fzf has been installed, you'll get a taste of the fzf
magic:
- Display the whole word list
- Fuzzy find a word from the word list & preview its meaning instantly
- preview each word definition instantly as you scroll through the list
alias cambl="camb l | fzf --preview 'camb {}'"
can be added in your bashrc, config.fish etc. for convenience
Installation
pip install cambridge
Usage
camb <word/phrase> e.g. camb value # look up a word/phrase in Cambridge Dictionary
camb <word/phrase> -v # look up a word/phrase in verbose/debug mode
camb <word/phrase> -w # look up a word/phrase in Merriam-Webster Dictionary
camb <word/phrase> -f # look up a word/phrase afresh without using cache
camb l # list words found before in alphabetical order
camb l -t # list words found before in reverse chronological order
camb l -r # list 20 words from the word list randomly
camb l -d # delete a word from the word list
camb <phrase with an apostrophe> # camb "a stone's throw" | camb a stone\'s throw
camb <phrase with a slash> # camb "have your/its moments" | camb have your\/its moments
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
Hashes for cambridge-3.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06510b7e3654ffbcc2044707b7ea3e0a216f6d82dd24d20fe0cf832f569463d |
|
MD5 | 330184e50b7c45dbf636ff06385c3b7f |
|
BLAKE2b-256 | d8104e46de053e5e109892dcc921064f9b49ea64a1880f09d6698ffa1ddf504a |