Popularity
1.1
Stable
Activity
3.7
-
29
5
4

Description

This Python-based CLI app integrates with the Cambridge Dictionary to deliver precise word definitions directly from your terminal. It provides detailed definitions, usage examples, and intelligently handles past tense and past participle forms. The app also offers auto-suggestions for related words in case of typos and includes a persistent caching mechanism for faster access."

Programming language: Python
License: MIT License
Tags: Command-line Tools     CLI     Utilities    

cambd alternatives and similar packages

Based on the "Command-line Tools" category.
Alternatively, view cambd alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of cambd or a related project?

Add another 'Command-line Tools' Package

README

cambd-cli

Cambridge dictionary cli app for personal use

cambd demo gif

Why

This is a personal project I have been developing and using for a while. Since English is not my first language. I often had to search the meanings of new words I encounter in podcasts or movies. Personally the only dictionary I use is the Cambridge dictionary. It has very concise and very easy-to-understand definitions. And I often find myself going back to their site, so I made this CLI tool to automate the process.

Features

  • Autosuggest related words if I mistyped the word when looking it up.
  • Interactive suggestion menu to select words from in the above case.
  • Handles past and past-particle words. Returns the original word definition.
  • No API/database involved.
  • Caching mechanism; so that already looked up words does not gets fetched again. Hence fast results.

Installation

Make sure you have GNU make and python(v3) installed on your system.

# clone the repo
$ git clone https://github.com/rocktimsaikia/cambd-cli.git

# change the working directrory to cambd-cli
$ cd cambd-cli

# install the requirements
$ python3 -m pip install -r requirements.txt

# install cambd-cli
$ sudo make install

Usage

run cambd --help

Cambridge dictionary cli app

Usage:
$ cambd <word>

Options:
--clean-cache   Clean the local cache.
--help      Print this help.

Examples:
$ cambd neccessery

By default it caches the words in $HOME/.cambd-cache.json. To clear the cache if needed run cambd --clear-cache. It is strongly recommended to not modify this file manually.

TODO

  • [x] Add loading animation.
  • [x] Handle error for getting definition of words with spaces.
  • [x] Show only 2 examples per definition by default.
  • [x] Implement a basic local caching mechanism.
  • [x] Handle past/past-participle word definitions.
  • [x] Refactor redirection for better word lookup.
  • [x] Better/clean way to print the values in terminal.
  • [ ] Add flag to show all definitions. Default is 1.

LICENSE

[MIT](./LICENSE) License © Rocktim Saikia 2022


*Note that all licence references and agreements mentioned in the cambd README section above are relevant to that project's source code only.