CLDictP: A Command-Line Dictionary Tool
A command line dictionary written in Perl using Merriam-Webster APIs.
This is my first project using Perl. I feel it is tedious to type formatted definitions to Quizlet(A website which can make flashcards for you) and I’m too lazy to open browser and online dictionary pages. Why not combining these two?
It uses following APIs:
Merriam-Webster Learner
Merriam-Webster Collegiate
For each entry, it contains:
Pronunciation: IPA(International Phonetic Alphabet)
Part of Speech
Grammar
Definition
Common Usage
Examples
All searched words are saved in a set and saved to searched.txt.
It also save searched words and definitions into the file quizlet.txt so that they can be imported into Quizlet which makes flashcards. The format is:
between term and definition:
$between cards:
---
Usage
Get API Keys: DictionaryAPI.
Add API Keys to
api_template.jsonand change the file name toapi.json.Install dependencies with
1$ cpan Term::ANSIColor Term::ReadKey LWP::UserAgent LWP::Protocol::https Readonly XML::LibXML JSON::XS Data::Dumper Set::LightRun the script with
1$ perl dict.plTo exit, use Ctrl+D.
Demo

Source Files
The source files are hosted on Github.