mdzhang / terminal-vocab

Print vocabulary on shell startup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command Line Vocab

Like sudocabulary but allows for loading custom vocab lists based on environment variables. Uses "Advanced" GRE words from Magoosh's vocab list, as an example.

Screenshot

screenshot 2018-07-31 09 46 12

Requirements

Installation

With basher

basher install mdzhang/terminal-vocab

Manually:

  1. Download the bin/vocab executable and move it onto your path e.g.

    export PATH="~/.local/bin:$PATH"
    mv vocab ~/.local/bin
  2. Ensure shell runs script on startup by adding the following to e.g. your ~/.bashrc

    if which vocab > /dev/null; then
      vocab
    fi

Custom Vocab Lists

  1. Make a JSON file where each entry in a top level array has the keys:
    • word: the vocab word
    • meaning: the definition of the word
    • pos: (optional) aka part of speech
    • example: (optional) a sentence using the word in an example
  2. Add the file under $VOCAB_HOME/data/<file name>.json
    • by default, VOCAB_HOME is the data directory alongside the vocab executable; if you used basher to install this, then it would be e.g. ~/.basher/cellar/packages/mdzhang/terminal-vocab/data
    • you can override this to point to some other directory on your host
  3. Change your environment variable VOCAB_SET to match <file name>
  4. Profit

License

MIT

About

Print vocabulary on shell startup


Languages

Language:Shell 100.0%