Skip to main content

Cambridge is a terminal version of Cambridge Dictionary. Its dictionary data comes from https://dictionary.cambridge.org.

Project description

Cambridge

Cambridge is a terminal version of Cambridge Dictionary.

The dictionary data comes from https://dictionary.cambridge.org

Screenshots

Look up a word

look up a word

Look up a phrase

look up a phrase

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

  1. Just camb <word/phrase> to look up what you need.
  2. Mostly takes less than 1s including web page fetching. Less than 0.1s for the same item's later search.
  3. Fetches the first dictionary on Cambridge, without different dictionaries with similar meanings making people dizzy.
  4. If not found, a list of related suggestions will be displayed.
  5. camb l to list words and phrases you've searched successfully.

In Conjuction with fzf

camb l | fzf --preview 'camb {}', if you've installed fzf, you'll get the following magics:

  1. fuzzy finding a word from the word list & instantly previewing its meaning
  2. displaying the whole word list & instantly previewing each word meaning as you scroll through the list list words
  3. You can also add alias cambl="camb l | fzf --preview 'camb {}'" in your shell config for convenience

Installation

pip install cambridge

Usage

camb <word/phrase>               # search a word or phrase. e.g. camb innocuous
camb <word/phrase> -v            # search a word or phrase in verbose mode
camb l                           # list all words you've searched successfully in alphabetical order
camb l -t                        # list all words you've searched successfully in reverse chronological order
camb l -r                        # randomly list 20 words you've searched successfully
camb l -d                        # delete a word from the word list

camb <phrase with an apostrophe> # e.g. camb "a stone's throw" OR camb a stone\'s throw
camb <phrase with a slash>       # e.g. camb "have your/its moments" OR 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

cambridge-1.1.4.tar.gz (428.9 kB view details)

Uploaded Source

Built Distribution

cambridge-1.1.4-py2.py3-none-any.whl (22.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cambridge-1.1.4.tar.gz.

File metadata

  • Download URL: cambridge-1.1.4.tar.gz
  • Upload date:
  • Size: 428.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for cambridge-1.1.4.tar.gz
Algorithm Hash digest
SHA256 6ba69f311203387a9c0e3bc570b073b3dee04586f74383fda0160084ee6f9bc5
MD5 c9e2af1cd83a7b0cd2eff7fa719eb725
BLAKE2b-256 47b703723fdb1145472a81c13da8fada74fc6dc385a820168bdd2c41bd0a3316

See more details on using hashes here.

File details

Details for the file cambridge-1.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: cambridge-1.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for cambridge-1.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b04152af0b408c483478e97df9799bd898298f2ee115c8b2ee8d1dc0fcbc9be8
MD5 0203b55d3afde6b94cf0270547dc0fa1
BLAKE2b-256 ab235237ee6ffb0becf6d7e87517dd8dafe123eada5e7c4f1d265862d0b5344b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page