Package: diction
# Diction
A wordnik commandline client![Example](https://i.imgur.com/1tx0CbB.gif)Diction is a python script that acts as a wrapper for Wordnik’s [API](https://developer.wordnik.com)
Best when piped intoless, because outputs can be pretty long## Getting StartedRunpip3 install git+https://github.com/Rayquaza01/dictionorpip3 install dictionRundiction.pyto download a sample config file to~/diction.iniAdd your API key to the config file## Arguments
Multiple arguments can be sent at a time.diction.py word example -d -rreturns definitions and related words for both “word” and “example”.### word
The word(s) used when calling the API. Multiple words can be entered, separated by spaces.
This is a positional argument, and must come before all other arguments.
Ex:diction.py word example …### useCanonical
Use the canonical version of the word (e.g. cats -> cat)
This argument overrides the configuration set indiction.ini. Each section has its ownuseCanonicaloption, defaulting tofalse.
Used as-cor–useCanonical### limit
The amount of results to return per section. Accepts one number as an argument.
This argument overrides the configuration set indiction.ini. Each section has its ownlimitoption, with different defaults for each section.
Used as-lor–limitEx:diction.py word -l 20 …### wordwrap
The maximum amount of characters to display on a single line. Accepts one number as an argument.
This argument overrides the configuration set indiction.ini. Theapisection has awordwrapoption, defaulting to80.
Setting the value to-1disables wordwrapping.
Used as-wwor–wordwrapEx:diction.py word -ww 100 …### examples
Whether to return examples of the word.
Used as-eor–examples### topExample
Same as examples, but only returns the first example.
Used as-teor–topExample### definitions
Whether to return definitions. Accepts parts of speech as arguments, space separated. Seereference.mdUsed as-dor–definitionsEx:diction.py word -d noun verb …Ex:diction.py word -d …### relatedWords
Whether to return related words. Accepts related types as arguments, space separated. Seereference.mdUsed as-ror–relatedWordsEx:diction.py word -r synonym antonym …### pronunciations
Whether to return pronunciation of the word.
Used as-por–pronunciations### hyphenation
Whether to return hyphenation of the word.
Used as-hyor–hyphenation### frequency
Whether to open a webpage with a graph of the word’s frequency. Takes a start year and an end year as arguments, or defaults to the years specified in the config.  [Chart.js](https://www.chartjs.org) is used to make the graph.
Used as-for–frequencyEx:diction.py -f 1800 2012 …### phrases
Whether to return two word phrases containing the word.
Used as-phor–phrases### etymologies
Whether to return the etymologies of the word.
Used as-etor–etymologies### audio
Whether to open a webpage with audio files of pronunciations.
Used as-aor–audio### randomWord
Whether to return a random word. The word argument has no affect on this.
Used as-rwor–randomWord### randomWords
Same as randomWord, but with more than one word. The word argument has no affect on this.
Used as-rwsor–randomWords### scrabbleScore
Whether to return the word’s scrabble score.
Used as-sor–scrabbleScore# Acknowledgements
Built using Python 3
Uses [Chart.js](https://www.chartjs.org) for frequency graph (MIT)
[![Powered by Wordnik](https://www.wordnik.com/img/wordnik_badge_a1.png)](https://wordnik.com)