#yandex #translate #translate-text #api-key #error #language #request

bin+lib yandex_translate

Rust wrapper on Yandex api translator https://tech.yandex.ru/translate/

2 stable releases

Uses old Rust 2015

2.1.0 Oct 19, 2017
2.0.0 Oct 14, 2017

#7 in #translate-text

Apache-2.0

13KB
267 lines

Yandex translate

Description

This project i write for learning rust. If you have some ideas or find some errors, i be happy if you did pull request.

Install

git clone https://github.com/Norbytus/yandex_translate_rust.git
cd yandex_translate_rust
cargo build --release
mv target/release/yandex_translate /usr/local/bin/

Config(Optional)

You can create dir .yandex_translate in your home dir and create inside file .yandex_translate.conf(with your API key)

Requirments

Need rustc 1.17.0-nightly

How to use

If your don't have config file you need always set flag -k with your api key. Show help

yandex_translate -h

Translate text example

yandex_translate -l en-ru -t "Hello world"

Translate text from pipe example

echo Hello wolrd | yandex_translate -l ru -p

OS

Testing on FreeBSD and ArchLinux

Dependencies

~6–15MB
~207K SLoC