Skip to content
A command-line dictionary written in Perl
Perl
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
api_template.json
demo.gif
dict.pl
test_color.pl

README.md

CLDictP

A command line dictionary written in Perl using Merriam-Webster 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 the 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

  1. Get API Keys: DictionaryAPI.

  2. Add API Keys to api_template.json and change the file name to api.json.

  3. Install dependencies with

$ cpan Term::ANSIColor Term::ReadKey LWP::UserAgent LWP::Protocol::https Readonly XML::LibXML JSON::XS Data::Dumper Set::Light
  1. Run the script with
$ perl dict.pl
  1. To exit, use Ctrl+D.

Demo

demo_gif

License

This project is under GNU General Public License v3.0

You can’t perform that action at this time.