52

GitHub - Mckinsey666/Vocab: ? A lightweight online dictionary integration to the...

 5 years ago
source link: https://github.com/Mckinsey666/Vocab
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

? Vocab

dict.jpg
68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6c696e75782d6c69676874677265792e737667 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d2533453d5f332e362d677265656e2e737667 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667


? A lightweight online dictionary integration to the command line. No browsers. No paperbacks.


demo.gif

Features

❓ Directly query words from the command line.

? Save words to your local dictionary.

? Add notes to saved words.

? Interactive word game to hone your vocabulary skills.

So how is this different from dict ?

dicthello.gif vocabhello.gif

dict is the client for DICT, or the Dictionary Server Protocol on Unix-like platforms. It is used to query natural language dictionaries without firing up a bloaty browser, which tremendously slows down your workflow.

Vocab aims to do the same as dict, only with some differences:

  • Less verbose result (since Vocab only uses one source).
  • Can save words to local client dictionary pickle file.
  • Can add notes to a saved word.
  • Includes a interactive word-quiz feature.
  • With colors ?!

All in all, Vocab is a great tool for fast word queries with easy-to-read definitions, and a good support for ESL users.

Requirements

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d2533453d5f332e362d677265656e2e737667 and the following libraries are required.

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d62656175746966756c736f75703425323025374325323072657175657374732532302537432532307465726d636f6c6f722d626c75652e737667

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6c696e75782d6c69676874677265792e737667 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d7474792532302537432532307465726d696f732d626c75652e737667

Setting up

  • Clone the git repository Vocab.
  • In /Vocab/lib/config.py, modify DICT_PATH, DICT_DIR to the ABSOLUTE PATH of the local dictionary file on your computer.
  • In root, type vi ~/.bashrc. Append the following at the end of the bashrc file : export PATH=$PATH/<ABSOLUTE PATH to git repo>

Running

? Launch vocab anywhere on your terminal.

After launching Vocab for the first time, a directory ./local will be created inside the git repo, and an empty pickle file dict will be stored in ./local. This path can be modified in ./lib/config.py.

Usage

$ vocab

Options:
    --mode, -m ['query', 'edit', 'dict', 'interactive']
    --file, -f <path to word list>
    --reset, -r
    --count, -c

Query Mode

❓ Directly search and save unknown words from the command line.

$ vocab -m query

query.gif

Dictionary Mode

? Scroll though pages to search for saved words.

$ vocab -m dict

dict.gif

Edit mode

✏️ Edit your save words and add notes.

$ vocab -m edit

edit.gif

Interactive Mode

? Test your vocabulary skills with the interactive mode.

$ vocab -m interactive

interactive.gif

Load Word List

? Load a list of words from to your local dictionary.

$ vocab -f <path to file>

file.gif

Count Total Words

? Count number of words saved in your local dictionary.

$ vocab -c

count.gif

Reset Local Dictionary

$ vocab -r

Help

$ vocab -h

Todo

  • Synonyms / Antonyms.
  • Full command line support (left, right keys, autofill).
  • Search history (up, down keys).

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK