dictionary-cli

3.0.1 • Public • Published

dictionary-cli

Build Status Coverage Status

Translations, usage examples and spell check via

Demonstration

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

License

MIT © ewnd9

Package Sidebar

Install

npm i dictionary-cli

Weekly Downloads

2

Version

3.0.1

License

none

Last publish

Collaborators

  • ewnd9