https://github.com/gussf/trnsl8
A translation CLI intended for the learning of Go
https://github.com/gussf/trnsl8
aws-comprehend aws-translate cli go
Last synced: 3 months ago
JSON representation
A translation CLI intended for the learning of Go
- Host: GitHub
- URL: https://github.com/gussf/trnsl8
- Owner: gussf
- License: apache-2.0
- Created: 2021-06-06T22:58:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-04T14:14:34.000Z (almost 4 years ago)
- Last Synced: 2024-06-21T14:04:22.496Z (12 months ago)
- Topics: aws-comprehend, aws-translate, cli, go
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# trnsl8
trnsl8 is a CLI written in Go (using Cobra package) that allows users to translate text and detect the language of input through the use of AWS Translate and AWS Comprehend
## Installation
```sh
go get -u github.com/gussf/trnsl8
```
## Usage#### Translation
```sh
# Translates text into a target language
# More information on language codes: https://docs.aws.amazon.com/translate/latest/dg/what-is.html
trnsl8 to# You can input a file to be translated
trnsl8 to -f# You can save the resulting translation to a file
trnsl8 to -o# And also both read from and write to files
trnsl8 to -f -o
```#### Detection
```sh
# Detects what language text is in
trnsl8 detect# You can also input files for detection
trnsl8 detect -f
```
## Examples
```sh
# Translation
trnsl8 to ja "I want this sentence in japanese"
trnsl8 to en "Ich möchte diesen Satz auf Englisch" -o result.txt
trnsl8 to ro -f ~/source.txt -o ~/result.txt# Detection
trnsl8 detect "ce limbă este aceasta?" # hint: its romanian!
trnsl8 detect -f really_big_text.txt
```
## Next steps
* Use docker?
* Unit tests?