define

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

Github星跟蹤圖

define

Build Status
Go Report Card
Latest Stable Version

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

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:

  • MERRIAM_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.

A preferred source can be specified with the command line flag --preferred-source="..." or in a 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:

主要指標

概覽
名稱與所有者Rican7/define
主編程語言Go
編程語言Go (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2018-03-14 01:20:50
推送於2024-03-06 05:38:33
最后一次提交
發布數7
最新版本名稱v0.4.0 (發布於 2024-03-05 22:36:53)
第一版名稱v0.1.0 (發布於 2018-03-21 22:48:08)
用户参与
星數381
關注者數7
派生數12
提交數217
已啟用問題?
問題數12
打開的問題數6
拉請求數24
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?