基于sougou api的简单命令行转换工具

sougou-cli的Python项目详细描述


基于python 的命令行下中英文翻译工具,使用搜狗翻译api

pip 安装

$ pip install sougou-cli

源码安装

$ git clone https://github.com/Gaterny/sougou-cli.git
$ cd sougou-cli
$ pip install -r requirements.txt
$ python setup.py install

使用

$ sg -h
usage: sg [-h] [-v] [word [word ...]]

the usage of Sougou-Dict command line

positional arguments:
  word           word or phrase you want to translate

optional arguments:
  -h, --help     show this help message and exit
  -v, --version  show current version

查询单词

$ sg beautiful

基本释义:
        >>> beautiful: 美丽的 <<<

查询句子

$ sg where there is a will, there is a way!

基本释义:
        >>> where there is a will, there is a way!: 有志者事竟成! <<<

中文翻译

$ sg 我不爱吃鸡排饭
基本释义:
        >>> 我不爱吃鸡排饭: I don't like chicken steak <<<

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何解决这个索引越界问题   HQL表达式中的java Null   未使用mongojackson删除java文档   windows Java编译了我的程序,但我无法运行它   java获取泛型T的类型   用于非IBM Windows计算机的java IBM SDK 7?   java数据库上多线程插入(更新)和单线程顺序插入(更新)的性能比较?   集合是否存在只接受一个条目并允许从映射中获取值的Java映射?   带有共享主键的JavaSpring数据JPA:OneToOne似乎不起作用   java与<>的区别?方法和变量声明中的超级/扩展字符串>   java从终端以调试模式运行jar   java如何找出谁破坏了密钥类型的事件?   osgi在Java中访问一个包的多个版本   如果输入不是整数,java会反复请求用户输入   在java中导入本地库错误   JavaE(fx)剪辑:带有javafx的首选项页面   基本Java映射的orm对象哈希映射(将POJO映射为映射)