| Crates.io | gtrans |
| lib.rs | gtrans |
| version | 0.2.1 |
| created_at | 2020-02-12 05:23:39.236189+00 |
| updated_at | 2020-03-04 14:36:38.385467+00 |
| description | Google translation CLI tool written in Rust |
| homepage | |
| repository | https://github.com/ksk001100/gtrans |
| max_upload_size | |
| id | 207534 |
| size | 50,597 |
Google translation CLI tool written in Rust
$ cargo install gtrans
In macOS you can install it with Homebrew
$ brew tap ksk001100/homebrew-gtrans
$ brew install gtrans
Default translation source is ja and target is en.
The source and target can be changed by setting the environment variables GTRANS_SOURCE and GTRANS_TARGET.
The source and target can be changed by specifying the --source and --target flags. In that case, the flags take precedence over the environment variables.
$ gtrans こんにちは世界
$ export GTRANS_SOURCE=en
$ export GTRANS_TARGET=ja
$ gtrans Hello world
$ GTRANS_SOURCE=en GTRANS_TARGET=ja gtrans Hello world
$ gtrans Hello world --source en --target ja
$ gtrans Hello world -s en -t ja
$ gtrans Bonjour, monde -s fr -t en