Skip to main content

This is a simple, yet powerful command line translator with baidu translate

Project description

# query
This is a simple, yet powerful command line translator with baidu translate
命令行下翻译工具,翻译服务基于百度翻译

https://github.com/yangyang-zhang/query
## install 安装
pip install query-cli

## Usage 用法

### English To Chinese(英文翻译中文)
```
query apple
*****************************
*apple:苹果
*****************************

```

### Chinese To English(中文翻译英文)

```
query -t en 苹果
*****************************
*苹果:Apple
*****************************
```

> 目标翻译语言支持英语、日语、德语等几十种语言,用 -t 指定翻译目标语言即可

### Chinese To Japan(中文翻译日文)
```
query -t jp 我是谁
*****************************
*我是谁:私は誰ですか
*****************************

```

## query 作为一个模块导入
>默认翻译为中文,第二个参数为翻译目标语言

```
>>> from query import Query
>>> q = Query('apple')
>>> q.translate()
apple:苹果
{'src_result': 'apple', 'trans_result': '苹果'}
>>> q = Query('english', 'wyw')
>>> q.translate()
english:英吉利语
{'src_result': 'english', 'trans_result': '英吉利语'}
```

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

query-cli-1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

query_cli-1.0-py2-none-any.whl (6.4 kB view details)

Uploaded Python 2

File details

Details for the file query-cli-1.0.tar.gz.

File metadata

  • Download URL: query-cli-1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for query-cli-1.0.tar.gz
Algorithm Hash digest
SHA256 a83168d2d9c7dc95d9595fc43e6d1c50ee8390f5c424e45e98c0ddc1b8cc3d54
MD5 a7131094c1d4fd55c2e2e2971d4d7ff7
BLAKE2b-256 d5f054f6fcfa6edfeb9861e396f187a8497029b9daaa17fb1f438ef83baa6a66

See more details on using hashes here.

File details

Details for the file query_cli-1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for query_cli-1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 c931e5259c398d025ce9f84a329c5975cb552d7d2bfc6293d62ff75c2b1dd59d
MD5 dc933de925ef876a4a694c9eea66d6fa
BLAKE2b-256 f46a0bcc28f51d971cc6b7121614f4a6853bff84815fbed98fcf27c2d50a2ead

See more details on using hashes here.

Supported by

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