Quickly look up translations without relying on the browser. This script is mostly just a fancy table formatter which happens to get it's data for formatting from dict.cc.
Features:
- very simple
- scales with respect to terminal width
I wanted a tool for the most convenient and quick access to vocab through my beloved cli.
-
Edit the shebang at the top of the file to use the python interpreter of your choice.
-
Install dependencies (fake_headers, requests, beautifulsoup4) with
pip install -r requirements.txt
. -
I recommend aliasing
search_dict_cc.py
in an rc-file of your shell in one of the following two ways.alias dict="/usr/bin/python313 $path_to/search_dict_cc.py " function dict() { "$path_to/search_dict_cc.py" "$@" }
-
As per my own preference, this script defaults to DE/EN as languages, which are simply set as
DEFAULT_LANG1
andDEFAULT_LANG2
constants in the script. Modify them as needed!
# regular lookup
dict word
# to start with language selector before search use -l (--language) toggle
dict word -l
# set -f (--full) toggle if default 20 line table is too short
dict word -f