Skip to content
forked from Rican7/define

A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.

License

Notifications You must be signed in to change notification settings

sofuture/define

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

define

Build Status Go Report Card Latest Stable Version

A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.

screen shot 2018-03-21 at 8 51 54 pm

Install

Pre-compiled binaries are available on the releases page.

If you have a working Go environment, you can install via go get:

go get github.com/Rican7/define

Configuration

The define app allows configuration through multiple means. You can either set configuration via:

  • Command line flags (good for one-off use)
  • A configuration file (good for your "dotfiles")
  • Environment variables (especially useful for API keys)

Command line flags

The list of command line flags is easily discovered via the --help flag. Any passed command line flag will take precedence over any other configuration mechanism.

Configuration file

A configuration file can be stored at ~/.define.conf.json and define will automatically load the values specified there.

To print the default values of the configuration, simply use the --print-config flag. This can also be used to initialize a configuration file, for example:

define --print-config > ~/.define.conf.json

Environment variables

Some configuration values can also be specified via environment variables. This is especially useful for API keys of different sources.

The following environment variables are read by define's sources:

  • MERIAM_WEBSTER_DICTIONARY_APP_KEY
  • OXFORD_DICTIONARY_APP_ID
  • OXFORD_DICTIONARY_APP_KEY

Sources

The define app has access to multiple sources, however some of them require user-specific API keys, due to usage limitations.

You can specify a preferred source either via the command line flag --preferred-source="..." or in your configuration file. For more information, see the section on Configuration.

Obtaining API keys

The following are links to register for API keys for the different sources:

About

A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 95.7%
  • Makefile 4.3%