# translate-cli **Repository Path**: tering/translate-cli ## Basic Information - **Project Name**: translate-cli - **Description**: 这是一个用来实现命令行翻译的软件 - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-11-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # translate-cli #### 介绍 这是一个命令行的翻译程序 依赖于有道翻译的网络接口 一般用来翻译看不懂的命令行输出,支持管道操作。 例如: ```shell > echo hello | fy hello 你好 > fy hello hello 你好 ``` ### 安装 ##### 方法一 1. 直接下载可执行文件至 /usr/local/bin 目录下 [mac](https://tering.gitee.io/exec/mac/fy) [linux](https://tering.gitee.io/exec/linux/fy) 2. 赋予可执行权限 3. 检查环境变量 4. 运行测试 ##### 方法二 ```shell # mac 下执行: > cd /usr/local/bin && curl -o fy https://tering.gitee.io/exec/mac/fy && sudo chmod 555 fy # linux 下执行: > cd /usr/local/bin && curl -o fy https://tering.gitee.io/exec/linux/fy && sudo chmod 555 fy ``` ##### 方法三 1. 安装 go 2. 运行 ```go > go install gitee.com/tering/translate-cli/fy ``` #### 码云特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)