dictionary-cli
v3.0.1
Published
Translate and look up usage examples via yandex services
Downloads
56
Maintainers
Readme
dictionary-cli
Translations, usage examples and spell check via
Install
$ npm install -g dictionary-cli
Usage
$ dictionary <lang-from> <lang-to> <input>
# if input matches /[a-zA-Z]/ it will translate from english to <lang>, otherwise from <lang> to english
$ dictionary --en=<lang> <input>
# if input matches /[а-яА-Я]/ it will translate from russian to <lang>, otherwise from <lang> to russian
$ dictionary --ru=<lang> <input>
$ dictionary <lang> --export
$ dictionary <lang> --export > history.txt
:shipit: Feel free to send PR for auto detection of other languages
Tips
Add aliases for language pairs in your .bashrc
/ .zshrc
alias d="dictionary --en=ru" # use as "d <english or russian word or sentence>"
# or
alias d="dictionary en ru" # use as "d <english word or sentence>"
alias x="dictionary ru en" # use as "x <russian word or sentence>"
Related
dictionary-rb - Provides meanings, similar words and usage examples for a word from Urban Dictionary and Dictionary Reference with CLI support
traktor - CLI for Yandex.Translator API + Yandex.Dictionary API
Notices
Yandex demands (1, 2) to put this in order to use their api
- «Реализовано с помощью сервиса «Яндекс.Словарь» https://tech.yandex.ru/dictionary/
- «Переведено «Яндекс.Переводчиком» http://translate.yandex.ru/
License
MIT © ewnd9