Skip to content

Commit

Permalink
upgrade to V0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed Sep 12, 2017
1 parent d7745b2 commit b43fc2e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

[1]: https://travis-ci.org/TimothyYe/ydict.svg?branch=master
[2]: https://travis-ci.org/TimothyYe/ydict
[3]: https://img.shields.io/badge/release-v0.8-brightgreen.svg
[3]: https://img.shields.io/badge/release-v0.9-brightgreen.svg
[4]: https://github.com/TimothyYe/ydict/releases
[5]: https://img.shields.io/dub/l/vibe-d.svg
[6]: LICENSE
Expand All @@ -27,6 +27,7 @@ Ydict, another command line dictionary for geeks!
* Chinese -> English
* English -> Chinese
* Show hints if word is not found
* Speech

## Installation

Expand All @@ -47,12 +48,43 @@ go get github.com/TimothyYe/ydict

Download it from [releases](https://github.com/TimothyYe/ydict/releases), and extact it to /usr/bin.

## 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

```bash
brew install mpg123
```
#### Ubuntu

```bash
sudo apt-get install mpg123
```

#### CentOS

```bash
yum install -y mpg123
```

## Usage

1. Query

```text
ydict <word(s) to query>
```

2. Query with speetch (__Available for MacOS & Linux__)

```text
ydict <word(s) to query> -v
```

## SOCKS5 proxy

Starting from V0.5, you can use SOCKS5 proxy. At the same directory of ydict, just create a ```.env``` file:
Expand Down
6 changes: 4 additions & 2 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ const (
██║ ██████╔╝██║╚██████╗ ██║
╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝
YDict V0.8
YDict V0.9
https://github.com/TimothyYe/ydict
`
)

func displayUsage() {
color.Cyan(logo)
color.Cyan("Usage: ydict <word(s) to query>")
color.Cyan("Usage:")
color.Cyan("ydict <word(s) to query> Query the word(s)")
color.Cyan("ydict <word(s) to query> -v Query with speech")
}

func isChinese(str string) bool {
Expand Down

0 comments on commit b43fc2e

Please sign in to comment.