- go to https://translate.yandex.ru/developers/keys and register your API key
- put it into
~/.yt/key
file as
APIKEY=trnsl.9.9.9999999999999999.9999999999999999.9999999999999999999999999999999999999999
(the file issource
d!) - place the
yt
script to a directory in your$PATH
(say, to~/bin/
)
or runmake install
yt -l
to list known languages and transpation pairsyt -L <text>
to detect the language of the <text>yt <lang1>[-<lang2>] <text>
to translate the <text> from <lang1> to <lang2>yt <text>
to translate the <text> in guessed terms
bash
curl
sed
jq
(needsepel-release
on CentOS)tr
,cat
,mktemp
,rm
,od
(usually fromcoreutils
)