Giter Site home page Giter Site logo

gdict's Introduction

gdict

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`

效果图

gdict's People

Contributors

lpx-e5bd8 avatar apocelipes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.