Git Product home page Git Product logo

dictc's Introduction

dictc 简单的在线查询单词小工具!

当前版本:0.1.1

主要功能

  • 支持多个在线词典服务及星际译王词典 bing 词典 stardict 词典

  • 支持交互模式下按 Tab 自动补全单词,支持在 bash/zsh 命令行下用 Tab 补全参数及选项

  • 发音支持

    需要 gstreamer 的 python 绑定,可以使用 yum/apt-get 安装。

安装方法

环境依赖:

  • python 2.7 + linux
  • gstreamer 的 python 绑定:

fedora 等安装方法:

su -c 'yum -y install gstreamer-python'

ubuntu 等安装方法:

su -c 'apt-get install python-gst0.10'

安装完依赖之后,接下来安装 dictc。

  • 用源代码安装:

    git clone https://github.com/grassofhust/dictc.git
    cd dictc
    python setup.py install
    
  • 下载 rpm 包安装

https://github.com/grassofhust/dictc/raw/master/assets/dictc-lastest.noarch.rpm

用法

dictc [-h] [-d dictionary] [-c completion] [--nosound] [-v] [keyword or sentence [keyword or sentence ...]]

可选参数

-h, --help           显示帮助信息
-d dictionary        词典(默认:bing):bing,stardict
-c completion        自动补全(默认:bing):bing,dictcn,spellcheck,external
--nosound            禁用发音(默认:启用)
-v, --version        显示版本信息

使用示例

dictc hello

直接查询 hello

dictc

进入交互式模式,按 CTRL-d 退出!

dictc -d bing -c dictcn

使用 dict.bing.com.cn 的在线翻译, dict.cn 来做查询时的自动补全!

截图

https://raw.github.com/grassofhust/dictc/master/assets/screenshot.jpeg

待办项

  • 利用 ncurses 来输出,更好的控制输出样式及交互
  • 后台查找
  • 国际化
  • 支持 stardict 词典格式?
  • 使用本地真人语音库?
  • python enchant, spell check support????
  • bash 命令行单词补全
  • 在 zsh 下,添加基于单词拼写的补全

相关链接

https://github.com/grassofhust/dictc

License

Beerware (If we meet some day, and you think this stuff is worth it, you can buy me a beer.)

dictc's People

Contributors

amzyang avatar

Watchers

James Cloos avatar Evica 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.