• Stars
    star
    361
  • Rank 114,190 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yet another command-line youdao dictionary for geeks!
โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•
 โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘        โ–ˆโ–ˆโ•‘   
  โ•šโ–ˆโ–ˆโ•”โ•  โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘        โ–ˆโ–ˆโ•‘   
   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•‘   
   โ•šโ•โ•   โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ•   โ•šโ•โ•   

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 install github.com/TimothyYe/ydict

Manual Installation

Download it from releases, and extract 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.

Windows x64

Speech Adaptation by ycrao under Windows OS.

  • Just copy bass.dll and mpg123.exe (can also with ydict.exe) file to Windows system path (such as C:\Windows\ or C:\Windows\System32 ) .
  • Or copy bass.dll and mpg123.exe (can also with ydict.exe) file to somewhere in the same directory, and setting that directory in PATH System Environment Variables .

Mac OS

brew install mpg123

Ubuntu

sudo apt-get install mpg123

CentOS

yum install -y mpg123

Usage

ydict [flags]

Flags:
  -c, --cache       Query with local cache, and save the query word(s) into the cache.
  -d, --delete      Remove word(s) from the cache.
  -h, --help        help for ydict
  -l, --list        List all the words from the local cache.
  -m, --more        Query with more example sentences.
  -p, --play int    Scan and display all the words in local cache.
  -q, --quiet       Query with quiet mode, don't show spinner.
  -r, --reset       Clear all the words from the local cache.
  -s, --sentence    Translation of sentences.
  -v, --voice int   Query with voice speech, the default voice play count is 0.
  1. Query
ydict <word(s) to query>
  1. Query with speech
ydict -v 1 <word(s) to query>
  1. Query and show more example sentences
ydict -m <word(s) to query>
  1. Query and add this word into local cache, next time when you query the same word, it will be feched from the local cache and be much more faster.
ydict -c <word(s) to query>
  1. Query sentence
ydict -s "ไฝ ่ง‰ๅพ—ๅ’‹ๆ ท๏ผŸ"

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.

New words notebook

Starting from ydict V2.0, new words notebook is supported. You can use is to add/delete your new words and play it.

  • Add a new word to the notebook
ydict -c hello
  • Remove a word from the notebook
ydict -d hello
  • List all the words from the notebook
ydict -l
  • Display a random word from the notebook for every 10 seconds
ydict -p 10

Help

Just type "ydict" to get help.

Licence

MIT License

More Repositories

1

godns

A dynamic DNS client tool supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
Go
1,347
star
2

skm

A simple and powerful SSH keys manager
Go
860
star
3

mydotfiles

All my dot configuration files.
Vim Script
383
star
4

bing-wallpaper

A RESTful API to fetch daily wallpaper from Bing.com
Go
238
star
5

glance

ไธ€ๆฌพๅŸบไบŽๅ‘ฝไปค่กŒๆ–‡ๆœฌๅฐ่ฏด้˜…่ฏปๅทฅๅ…ท๏ผŒ996ไธŽ10107็จ‹ๅบๅ‘˜ๆ‘ธ้ฑผๅˆ’ๆฐดๅฟ…ๅค‡็ฅžๅ™จ
Go
134
star
6

biturl

URL shortener service, powered by Go.
Go
116
star
7

k8s-offline

Offline installation package for kubernetes.
Shell
69
star
8

namebeta

A command line domain query tool.
Go
45
star
9

DynDNS

Dynamic DNS script tool, written by ruby.
Ruby
37
star
10

exchangerate

A command-line tool to query exchange rate.
Go
34
star
11

vim-tips-web

Source code for vim-tips.com, rewritten by Go.
Go
32
star
12

doom-emacs

My Doom Emacs configuration
YASnippet
24
star
13

bspwm-config

My bspwm configuration.
Shell
13
star
14

vim-tips

A vim plugin to show tips of vim in Vim editor.
Vim Script
10
star
15

gpool

A lightweight Goroutine pool.
Go
7
star
16

DailyVimTips

Vim tips app for iOS, powered by Swift.
Swift
7
star
17

vim-ydict

A Vim plugin for ydict
Vim Script
6
star
18

martini-paginate

A pagination plugin for go-martini web framework.
Go
3
star
19

minyx-lite-timothy

PHP
3
star
20

leetcode

My leetcode solutions by Go.
Go
2
star
21

iris-demo

Iris demo project.
Go
2
star
22

kbt

KBT ็จ‹ๅบๅ‘˜้”ฎ็›˜ๅ‘็ƒง็คพ, an open source forum, forked from elixir-china.
Elixir
2
star
23

btc-api

Restful API for getting latest Bitcoin price
JavaScript
2
star
24

emacs

My GNU Emacs Configuration
1
star
25

alfred2-vimtips-workflow

Alfred 2 Workflow to get random vim tips from vim-tips.com
1
star