Skip to main content

YouDao Console Version, a simple wrapper for Youdao API

Project description

Simple wrapper for Youdao online translate (Chinese <-> English) service API, as an alternative to the StarDict Console Version(sdcv).

注意

有道翻译API 将于 2018-12-31 后停止运行,改由“有道云-有道智云文本翻译” 提供兼容的服务;目前本项目代码已经匹配升级,但是按照文档说法,有道智云API是“按量收费”,目前账户内有100元体验金,具体收费计算方式尚不明确,项目工具的用户量不明确,而又本项目开源,所用服务标识的ID/SECRET也可能被他人使用,因而此后本项目功能存在不确定性。

Usage

$ ydcv --help
usage: ydcv.py [-h] [-f] [-s] [-S] [-r] [-p {festival,mpg123,sox,mpv}]
               [-a {auto,uk,us}] [-x] [--color {always,auto,never}]
               [-F {zh-CHS,ja,EN,ko,fr,ru,pt,es,vi,de,ar,id}]
               [-t {zh-CHS,ja,EN,ko,fr,ru,pt,es,vi,de,ar,id}]
               [words [words ...]]

Youdao Console Version

positional arguments:
  words                 words to lookup, or quoted sentences to translate.

optional arguments:
  -h, --help            show this help message and exit
  -f, --full            print full web reference, only the first 3 results
                        will be printed without this flag.
  -s, --simple          only show explainations. argument "-f" will not take
                        effect.
  -S, --speech          print URL to speech audio.
  -r, --read            read out the word with player provided by "-p" option.
  -p {festival,mpg123,sox,mpv}, --player {festival,mpg123,sox,mpv}
                        read out the word with this play.Default to 'festival'
                        or can be 'mpg123', 'sox', 'mpv'.-S option is required
                        if player is not festival.
  -a {auto,uk,us}, --accent {auto,uk,us}
                        set default accent to read the word in. Default to
                        'auto' or can be 'uk', or 'us'.
  -x, --selection       show explaination of current selection.
  --color {always,auto,never}
                        colorize the output. Default to 'auto' or can be
                        'never' or 'always'.
  -F {zh-CHS,ja,EN,ko,fr,ru,pt,es,vi,de,ar,id}, --from {zh-CHS,ja,EN,ko,fr,ru,pt,es,vi,de,ar,id}
                        Translate from specific language. Default: EN
  -t {zh-CHS,ja,EN,ko,fr,ru,pt,es,vi,de,ar,id}, --to {zh-CHS,ja,EN,ko,fr,ru,pt,es,vi,de,ar,id}
                        Translate to specific language. Default: zh-CHS

翻译支持的语言列表

--from--to参数可以指定特定语言之间相互翻译,但只有中文结果有词典内容

语言

代码

语言

代码

语言

代码

语言

代码

中文

zh-CHS

葡萄牙文

pt

韩文

ko

德文

de

日文

ja

西班牙文

es

法文

fr

阿拉伯文

ar

英文

EN

越南文

vi

俄文

ru

印尼文

id

Installation

pip install ydcv

Environment

  • Python ( >=2.7, 3.x )

Similar Projects (based on github search results)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ydcv-0.6.1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distributions

ydcv-0.6.1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

ydcv-0.6.1-py2-none-any.whl (19.8 kB view details)

Uploaded Python 2

File details

Details for the file ydcv-0.6.1.tar.gz.

File metadata

  • Download URL: ydcv-0.6.1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for ydcv-0.6.1.tar.gz
Algorithm Hash digest
SHA256 609da6a66fe7ccd0f68cadd311ef5757f8884261ec648477338f15b6ba6414dc
MD5 6fe47530908d047a3ce69ff699573a5c
BLAKE2b-256 09ef8e16b5790935b0079140d315dd3c42f9121d10d747697b679eb9f9bad885

See more details on using hashes here.

File details

Details for the file ydcv-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: ydcv-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for ydcv-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae256c3d201f87927c159001c1a8595cbab9124eed6249ef33ee906b95c18517
MD5 7db24f6dba1aa0759d6d0ec3334bfa9d
BLAKE2b-256 64b37ac3613dccf58950f252956fdf12f7c4dd44ad86c570fd0f07cef51f1b3e

See more details on using hashes here.

File details

Details for the file ydcv-0.6.1-py2-none-any.whl.

File metadata

  • Download URL: ydcv-0.6.1-py2-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for ydcv-0.6.1-py2-none-any.whl
Algorithm Hash digest
SHA256 b63ee0d391cca7084b3da59d44b80b35289dd0a59ad1312b8c9af903d224e98f
MD5 7aaa9b9aed1a2dddd4ad9cceb52f42d7
BLAKE2b-256 5454ebc4c279ce7424410239a4a91a65e0de88e25b3c657b1875b58b66336b62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page