Giter Site home page Giter Site logo

fy's Introduction

            ____
           / __/_  __
          / /_/ / / /
         / __/ /_/ /
        /_/  \__, /
            /____/

中文 | English

Release Build Status Go Report Card GoDoc DUB

fy是一个命令行下的翻译工具。

声明

本项目仅出于学习目的编写,获取跟共享的行为或许有侵犯权益的嫌疑。请您了解相关情况,如果侵犯了您的权益,请与我联系,我会及时删除。

安装

Homebrew

brew tap xwjdsh/tap
brew install xwjdsh/tap/fy

Go

go get -u github.com/xwjdsh/fy/cmd/fy

Docker

alias fy='docker run -t --rm wendellsun/fy'

Manual

releases 下载可执行文件并将其放到 PATH 环境变量对应的路径中。

使用

Usage of ./fy:
  -d    Debug mode, if an error occurs during translation, the error message will be displayed as the translation result
  -f string
        File path
  -s    Display translator sources
  -t string
        The target language of the translation
  -timeout duration
        The timeout for each translator (default 5s)
  -translator string
        Restrict the translators used, comma separated. eg 'baidu,google'

语言映射

简写 对应语言
zh-CN 中文
en 英语
ru 俄语
ja 日语
de 德语
fr 法语
ko 韩语
es 西班牙语

示例

# 显示支持的翻译者的信息
fy -s

# 不输入参数,则会访问剪贴板内容
fy

# 普通方式
fy test

# 调试模式
fy -d test

# 指定目标语言
fy -t ja 测试翻译为日语

# 指定中文的翻译语言,默认为英语
FY_CN_TO=ko fy 翻译为韩语

# 指定非中文的翻译语言,默认为简体中文
FY_NOT_CN_TO=en fy 중국어로 번역

# 翻译文件
cat `test.txt` | fy
fy < test.txt
fy -f test.txt

# 选择指定的翻译者
fy -translator 'baidu,google' test

协议

MIT License

fy's People

Contributors

dependabot[bot] avatar xwjdsh 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  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

The installation by go failed

The installation command way by go should be go get -u github.com/xwjdsh/fy/cmd/fy.

If i execute this command from README.md: go get -u github.com/xwjdsh/cmd/fy, it would has error like this: fatal: could not read Username for 'https://github.com': terminal prompts disabled package github.com/xwjdsh/cmd/fy: exit status 128

Add support for ChatGPT

The ChatGPT translation service offers superior results compared to other services like Google and DeepL. It would be great to have it integrated as an option for users。

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.