Coder Social home page Coder Social logo

fy's Introduction

pyecharts logo

🌐 fy

Translate words via command line. Inspired by afc163/fanyi, but more features.

Travis Build Status Appveyor Build Status Appveyor Build Status PyPI - Python Version PyPI - Python Version MIT License

✨ 特性

  • 单词字典查询
  • 中英句子互译
  • 关键词高亮
  • 发音(只在 Windows 下,Linux/MacOS 暂时未找到合适的第三方库)
  • Prompt shell,支持单词补全
  • 支持配置文件(配置查询来源以及对应接口的 TOKEN KEY)
  • records shell,记录查询历史

🔰 安装

pip 安装

$ pip(3) install fy

源码安装

$ git clone https://github.com/chenjiandongx/fy.git
$ cd fy
$ pip(3) install -r requirements.txt
$ python setup.py install

📝 使用

$ fy --help
usage: fy [-h] [-s] [-r] [-R] [-v] [WORDS [WORDS ...]]

Translate words via command line

positional arguments:
  WORDS          the words to translate

optional arguments:
  -h, --help     show this help message and exit
  -s, --shell    spawn a query prompt shell.
  -r, --records  spawn a records prompt shell.
  -R, --reset    reset fy configuration.
  -v, --version  displays the current version of fy.

查单词

英译中

中译英

query prompt shell

records prompt shell

使用 SQLite 数据库,表名称为 words

🔧 配置

配置文件内容为

$ car ~/.fy.json

{
    "query_source": "google,youdao,iciba",
    "youdao_key": "1945325576",
    "youdao_key_from": "Youdao-dict-v21",
    "iciba_key": "4B26F43688FA072E0B94F68FFCE224CF",
    "enable_sound": true
}

查询源

目前支持 google、youdao、iciba,如果只想使用 youdao 源,可修改为 query_source: "youdao",google/iciba 同理

TOKEN KEY

目前使用的 TOKEN KEY 都是我自己申请的,youdao 有限制,iciba 没有,开发者可以自行申请替换。

📅 Changelog

V1.6.0 - 2019-09-16

  • Update: 新增 pangu 分词

V1.5.2 - 2019-08-28

  • Add: 新增 -R 参数,重置配置信息

V1.5.1 - 2019-08-19

  • Update: 输出格式调整

V1.5.0 - 2019-08-19

  • Add: 新增 google 翻译源

V1.4.1 - 2019-01-28

  • Add: 新增关闭声音配置项

V1.4.0 - 2019-01-28

  • Update: 使用 sqlite prompt shell

V1.3.0 - 2019-01-27

  • Add: 支持保存历史查询记录

V1.2.1 - 2019-01-26

  • Update: 声明支持的 Python 版本

V1.2.0 - 2019-01-26

  • Add: 提供配置文件

V1.1.0 - 2019-01-25

  • Add: 新增发音功能

V1.0.0 - 2019-01-24

  • Alpha: 第一个正式版发布

📃 LICENSE

MIT ©chenjiandongx

fy's People

Contributors

chenjiandongx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fy's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.