Skip to content

Quickly look up translations without relying on the browser.

License

Notifications You must be signed in to change notification settings

thstkn/dictcc-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dictcc-cli

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:

  1. very simple
  2. scales with respect to terminal width



Why

I wanted a tool for the most convenient and quick access to vocab through my beloved cli.



How to setup

  1. Edit the shebang at the top of the file to use the python interpreter of your choice.

  2. Install dependencies (fake_headers, requests, beautifulsoup4) with pip install -r requirements.txt.

  3. 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" "$@" }
  4. As per my own preference, this script defaults to DE/EN as languages, which are simply set as DEFAULT_LANG1 and DEFAULT_LANG2 constants in the script. Modify them as needed!



How to use

# 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

About

Quickly look up translations without relying on the browser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages