Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A command line dictionary written in golang powered by multi engines.

License

NotificationsYou must be signed in to change notification settings

LPX-E5BD8/gdict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A command line dictionary written in golang powered by multi engines.

快速使用指南

安装

go get -u github.com/liipx/gdict

升级

cd$GOPATH/src/github.com/liipx/gdict&& git pull&& make install

使用

简单使用案例
  • 有道词典

  • 必应词典


  • 金山爱词霸

说明

$ gdict [options ...] word [options ...]

对参数做了处理,参数没有特定的位置限制【甚至于可以在句子中夹杂着参数..】

Options:

Options:  Style: -dark, -light              // 配色方案   Read: -s, --say  (MacOS only)    // 魅惑发音 Engine: -e <engine name>           // 词典引擎,目前支持Youdao、bing(默认为有道youdao)   Help: -h, --help                 // 查看帮助

TODO

  1. 离线缓存
  2. 词汇笔记本

其他说明

  1. 有道云、爱词霸API所使用Key皆来自github,侵删。
  2. MacOS支持鬼魅朗读,可以感受一下:gdict xxx -s ... 其实就是调用的say
  3. 支持Alfred workflow 格式的输出,可以按照下面的步骤定制自己的workflow
  4. 或者直接使用alfred目录下我导出的文件进行安装,安装后记得修改路径
# 1. 打开 workflow# 2. 添加 script filter# 3. 填写 `Keyword` 等基本信息# 4. language选择/bin/bash,内容从下文`query=$1`到最后# 5. 输出追加一个`copy to clipboard`即可# 脚本内粘贴以下内容    query=$1# 将下面的信息修改为 gdict binary 的存放路径BINPATH="/like/your/gopath/bin"     # 参数一定要指定-w,输出特定格式的值# 按照以下配置进行引擎切换# $BINPATH/gdict -w -e bing $query# $BINPATH/gdict -w -e iciba $query     $BINPATH/gdict -w -e youdao $query`

效果图

About

A command line dictionary written in golang powered by multi engines.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp