Skip to content

Instantly share code, notes, and snippets.

@farrokhi
Last active February 14, 2023 10:50
Show Gist options
  • Save farrokhi/72a602d39ec537849bb0d4d36186b6e1 to your computer and use it in GitHub Desktop.
Save farrokhi/72a602d39ec537849bb0d4d36186b6e1 to your computer and use it in GitHub Desktop.
Using Webster 1939 dictionary in MacOS terminal

Download and extract the dictionary:

wget https://s3.amazonaws.com/jsomers/dictionary.zip
unzip dictionary.zip
tar zxf dictionary/stardict-dictd-web1913-2.4.2.tar.bz2

Move it to a proper place:

mkdir ~/dict/
mv stardict-dictd-web1913-2.4.2 ~/dict/

Install sdcv:

brew install sdcv

Set up sdcv to pick up your dictionary (I use csh):

# this can be done either by setting the `STARDICT_DATA_DIR` environment variable
setenv STARDICT_DATA_DIR "~/dict/"

# or setting up an alias to sdcv for convenience
alias d sdcv -2 ~/dict/ -c -0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment