https://github.com/grantshandy/libretrans
A command line tool for translating using the libretranslate API
https://github.com/grantshandy/libretrans
Last synced: about 2 months ago
JSON representation
A command line tool for translating using the libretranslate API
- Host: GitHub
- URL: https://github.com/grantshandy/libretrans
- Owner: grantshandy
- License: gpl-3.0
- Created: 2021-01-31T00:44:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-23T19:49:28.000Z (almost 4 years ago)
- Last Synced: 2025-03-11T05:48:16.944Z (2 months ago)
- Language: Rust
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libretrans
A command line tool for translating using the libretranslate API## Examples
Basic usage:
```
$ libretrans en:fr "Hello World"
Bonjour à tous
```A verbose flag can also be used:
```
$ libretrans -v fr:en "C'est la vie!"
French: "C'est la vie!"
English: "It's life!"
```As of right now, libretranslate.com needs a key while they upgrade, so you can input a custom url to another instance:
```
$ libretrans -u https://libretranslate.de en:es "This is a test"
Esta es una prueba
```## Compiling From Source
Cargo/Rust is required to build.Just install it to your cargo path like so:
```
$ cargo install --path="."
```Or just install from crates.io:
```
cargo install libretrans
```## Command Line Arguments
```
libretrans 0.1.8
Grant Handy
Translates text from one language to another.USAGE:
libretrans [FLAGS] [OPTIONS] :FLAGS:
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose Run with verbose output.OPTIONS:
-u, --url What libretranslate instance to translate from.ARGS:
: Choose what languages to translate from.
Possible values: ["en", "ar", "zh", "fr", "de", "it", "pt", "ru", "es", "ja"]
Tip: You can format languages like ":" to detect the input language.
What text to translate.
```