pyonlinedict Linux终端在线字典

pyonliedict.gif

0x00 前言

有时候使用linux,在终端经常遇到一些不会的英文单词句子,又嫌难得再去开个浏览器去查,于是便动手写一个在终端就可以查询的脚本,有兴趣将将就用用吧。

0x01 中文说明

1.介绍

pyonlinedict是一个基于python 2.7开发的命令行在线字典,支持27种语言的字词或句子翻译查询,当我们遇到不会字词或句子时,可以通过它轻松查询意思。

2.安装

1
2
3
4
5
6
7
git clone https://github.com/sunnyelf/pyonlinedict.git
cd pyonlinedict
tar -xzvf pyonlinedict-1.0.6.tar.gz
python setup.py install --record install_path.txt

或者直接:

1
pip install pyonlinedict

4.用法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
用法:pyonlinedict [选项]
  选项:
   -h,--help 显示帮助消息并退出
   -q,--query 要查询的字或句子(必需的参数)
   -f,--from 输入语言的类型(默认设置:auto)
   -t,--to 输出语言的类型(默认设置:zh)
   -l,--list 列出支持的语言类型
   -v,-version 显示当前版本号和作者信息
  用例:
   pyonlinedict -h
   pyonlinedict -l
   pyonlinedict -v
   pyonlinedict -q hello
   pyonlinedict -q hello -f en -t zh
   pyonlinedict -q 'hello world' -f en -t zh

5.卸载

1
cat install_path.txt | xargs rm -rf

通过pip方式安装的卸载方法:

1
pip uninstall pyonliedict

0x02 英文说明

1.Introduction

Pyonlinedict is a command-line online dictionary based on Python 2.7 that supports queries in 27 languages or sentences. It is easy to find meaning when we encounter words or sentences that are not words or sentences.

2.Installation

1
2
3
4
5
6
7
8
9
10
11
git clone https://github.com/suunyelf/pyonlinedict.git
cd pyonlinedict
tar -xzvf pyonlinedict-1.0.6.tar.gz
python setup.py install --record install_path.txt
Or directly:
pip install pyonlinedict

3.Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Usage: pyonlinedict [options]
Options:
-h, --help Show help message and exit
-q, --query The word or sentence to be queried(required parameters)
-f, --from The type of the input language(default setting:auto)
-t, --to The type of the output language(default setting:zh)
-l, --list List the supported language types
-v, --version Displays the current version number and author information
Usages:
pyonlinedict -h
pyonlinedict -l
pyonlinedict -v
pyonlinedict -q hello
pyonlinedict -q hello -f en -t zh
pyonlinedict -q 'Hello world!' -f en -t zh

5.Uninstall

1
cat install_path.txt | xargs rm -rf

Unloading method installed by pip:

1
pip install pyonliedict