Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cirolee/bf
bf is a translation tool, based on baidu translate api, that used in command line
https://github.com/cirolee/bf
Last synced: 3 days ago
JSON representation
bf is a translation tool, based on baidu translate api, that used in command line
- Host: GitHub
- URL: https://github.com/cirolee/bf
- Owner: CiroLee
- License: mit
- Created: 2022-10-07T17:54:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-25T05:59:27.000Z (over 1 year ago)
- Last Synced: 2024-10-11T10:51:47.645Z (26 days ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/bf-translate
- Size: 381 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bf
> **bf**(Baidu Fanyi) is a translation tool, based on baidu translate api, that used in command line
# Install
```shell
npm install bf-translate -g
```# Usage
```shell
bf --help // or bf -h// output
Usage bf [options]
-v,--version output the version number
-h,--help show help info
-lang,--language output the list of supported languages
--from [lang] the source language
--to [lang] the target language
--cases [c|p|k|s|all] convert the result using the cases```
bf is friendly to chinese-english translation. If your queries include Chinese, and without target language(--to), bf will regart queries as Chinese and translates it to English. Otherwise use `--from(default is auto)` and `--to(default is auto)` sets
```shell
bf hello, 吃饭了吗?- Hello, have you eaten yet?
```Also, you can use `cases` param to convert the result via the case you input. Now it supports `c(camelCase)`, `p(PascalCase)`, `s(snake_case)` and `k(kebab-case)`, if you want to output all cases you can just use `all` for the case.
![demo](./assets/bf-cases-2.jpg)