Go CLI for the Oxford Dictionary API
NOTE: The Oxford Dictionary does support far less languages then I thought. So contrary to the initial plan, the tool will primarly serve as an English Dictionary
- Create your Oxford Dictionaries Developer Account
- Find your API credentials
- Modify
api.go.template, insert your credentials and save it asapi.go - Build the CLI tool:
go build cmd/ox.go
Look up the word "beer" in the English dictionary:
ox -lang en beer
English is the default language, so you can just type:
ox beer
Look up the word "trabajo" in the Spanish dictionary:
ox -lang es trabajo
Look up the word "television" in the English dictionary:
ox dict -lang en television
Look up the word "достопримечательность" in the Russian dictionary:
ox dict -lang ru достопримечательность
Short syantax:
ox dict -l en television
ox dict -l ru достопримечательность
Translate the English word "beer" to German:
ox trans -from en -to de beer
Translate the French word "chien" to Russian:
ox trans -from fr -to ru chien
Short syntax:
ox trans -f en -t de beer
ox trans -f fr -t ru chien
List available languages:
ox langs