Skip to content

jn0/YandexTranslateCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YandexTranslateCLI

Install

  1. go to https://translate.yandex.ru/developers/keys and register your API key
  2. put it into ~/.yt/key file as
    APIKEY=trnsl.9.9.9999999999999999.9999999999999999.9999999999999999999999999999999999999999
    (the file is sourced!)
  3. place the yt script to a directory in your $PATH (say, to ~/bin/)
    or run make install

Usage

  • yt -l to list known languages and transpation pairs
  • yt -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

Depends on

  • bash
  • curl
  • sed
  • jq (needs epel-release on CentOS)
  • tr, cat, mktemp, rm, od (usually from coreutils)

EOF