A command-line interface to Yahoo's online English-Chinese dictionary.
- Displaying definitions in color
- Highlighting keywords and their variants
- Auto-correcting spelling
$ npm install -g ydict-client
$ ydict-client <word or phrase>
$ ydict-client word
$ ydict-client look up
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));
});
$ npm install
$ npm test
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!
MIT