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

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. Takes less than 2s for the first run based on my 200M bandwith, including fetching, parsing, printing, and writing cache.
  3. Less than 0.1s for the same item's later search.
  4. Only fetches the first dictionary on Cambridge, getting rid of confuses by different dictionaries
  5. If not found, a list of related suggestions will be displayed.
  6. camb l to list words and phrases you've searched successfully.

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 words searched successfully in alphabetical order
camb l -t                        # list words searched successfully 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> # e.g. camb "a stone's throw" | camb a stone\'s throw
camb <phrase with a slash>       # e.g. camb "have your/its moments" | camb have your\/its moments

Project details


Release history Release notifications | RSS feed

This version

2.2.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cambridge-2.2.1.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

cambridge-2.2.1-py2.py3-none-any.whl (23.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for cambridge-2.2.1.tar.gz
Algorithm Hash digest
SHA256 3ccaf864dedac7594b1ad29f3d1a1a29e2c80246b42fc1863cacdb77715711f3
MD5 c3a9688eb15777cb237b0e2056fa75b6
BLAKE2b-256 ab3ea8b9d9184364220032f372b02d2e6c073f64012b1b1104a8c538dd0471ec

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cambridge-2.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fd57835210d9269845e1592b72ab29524b82466d52890d07e2080e14ec4f9e95
MD5 0896e384d7c59827379520b5a0b7c8de
BLAKE2b-256 960d5c7bc9bebaf3eb286d79210578aba74565aff978d141e851556e977d53cb

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