Skip to content

Latest commit

 

History

History
118 lines (79 loc) · 2.73 KB

README.md

File metadata and controls

118 lines (79 loc) · 2.73 KB
██╗   ██╗██████╗ ██╗ ██████╗████████╗
╚██╗ ██╔╝██╔══██╗██║██╔════╝╚══██╔══╝
 ╚████╔╝ ██║  ██║██║██║        ██║   
  ╚██╔╝  ██║  ██║██║██║        ██║   
   ██║   ██████╔╝██║╚██████╗   ██║   
   ╚═╝   ╚═════╝ ╚═╝ ╚═════╝   ╚═╝   

Release MIT licensed Build Status Go Report Card

Ydict, another command-line youdao dictionary for geeks!

(中文介绍文档)

Features

  • Chinese -> English
  • English -> Chinese
  • Show hints if word is not found
  • Speech
  • Show example sentences
  • Vim support

Installation

Homebrew

brew tap timothyye/tap
brew install timothyye/tap/ydict

Using Go

go get github.com/TimothyYe/ydict

Manual Installation

Download it from releases, and extact it to /usr/bin.

Integrate with Vim

To query words from Vim, you need another Vim plugin: vim-ydict

Speech

Starting from V0.9, speech feature is available. You need to install mpg123 to enable this feature.

NOTICE: Currently, speech feature is only available for MacOS/Linux.

Mac OS

brew install mpg123

Ubuntu

sudo apt-get install mpg123

CentOS

yum install -y mpg123

Usage

  1. Query
ydict <word(s) to query>
  1. Query with speech (Available for MacOS & Linux)
ydict <word(s) to query> -v
  1. Query and show more example sentences
ydict <word(s) to query> -m

SOCKS5 proxy

Starting from V0.5, you can use SOCKS5 proxy. At the same directory of ydict, just create a .env file:

SOCKS5=127.0.0.1:7070

Now all the queries will go through the specified SOCKS5 proxy.

Help

Just type "ydict" to get help.

Licence

MIT License