ydict-client
v0.1.0
Published
A command-line interface to Yahoo's online English-Chinese dictionary.
Downloads
9
Readme
ydict-client
A command-line interface to Yahoo's online English-Chinese dictionary.
Features
- Displaying definitions in color
- Highlighting keywords and their variants
- Auto-correcting spelling
Screenshot
Installation
$ npm install -g ydict-client
Usage
$ ydict-client <word or phrase>
Examples
$ ydict-client word
$ ydict-client look up
API
To use it programmatically:
var ydictClient = require('ydict-client');
ydictClient('word', function(error, definition) {
if (error) throw new Error(error);
console.log(JSON.stringify(definition));
});
Tests
$ npm install
$ npm test
Credits
I'd been using ydict from Homebrew until it ceased to work. I decided to maintain my own version to avoid this situation. Inspiration and code come from chunghe/ydict and sayuan/ydict.js. Thank you all!
License
MIT