Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Terminal based Offline Dictionary in Perl

by Anonymous Monk
on Mar 12, 2014 at 07:45 UTC ( [id://1077982]=note: print w/replies, xml ) Need Help??


in reply to Terminal based Offline Dictionary in Perl

Hi :)

The app requires the Database at /home/$USER/ (Replace the $USER with username or value of echo $USER)

Hi :) See File::UserConfig, its File::HomeDir + File::ShareDir

see example https://metacpan.org/source/CRZEDPSYC/App-DuckPAN-0.137

So :)

App-Wordzilla/bin/ App-Wordzilla/lib/App/Wordzilla.pm App-Wordzilla/share/Wordzilla.sqlite App-Wordzilla/MANIFEST App-Wordzilla/Makefile.PL App-Wordzilla/README.md

Then to create installable package (a tarball) run perl Makefile.PL && make dist

Then to install (if you upload to cpan)  cpan App::Wordzilla
or cpanm git://github.com/tirkarthi/Wordzilla-Perl
or cpan ./App-Wordzilla-0.01.tar.gz

Other comments,

See dict for a nice interface :) prompting is laborious :) options are always more fun that prompting :) ... The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan!

 my $choice = <STDIN>; ... ..

If you're keen on prompting, see ExtUtils::MakeMaker::prompt

Also bin/wordzilla becomes

#!/usr/bin/perl -- use strict; use warnings; use App::Wordzilla; App::Wordzilla::run( @ARGV ); exit( 0 );

And you've got yourself a "CPAN" style distribution

If you're interested, I offer you ?node_id=3989;HIT=module;re=N;Tu;M,

Replies are listed 'Best First'.
Re^2: Terminal based Offline Dictionary in Perl
by xtreak (Initiate) on Mar 13, 2014 at 11:53 UTC
    Thanks for your valuable feedback.

    1. Prompting :

    Regarding prompts. Each word has a lot of meanings in a lot of contexts. So instead of filling up the screen with 4 to 5 meanings I thought it will be better to display the first meaning and ask the user whether he wants to display the rest of the meanings. Ya it might annoy the user. I will look at more options.


    2. Net::Dict

    I haven't referred to Net::Dict . I will look at it. The reason I have created the script is that I am not often connected to the internet so an offline dictionary will be helpful and also the word list is editable and can be used for ones purposes like a word game, flash cards, etc.


    3. CPAN distribution :

    I have created this app primarily for Linux as many Windows users don't use Terminal IMO. So a CPAN distro will be nice as most Linux distros come with Perl. But I am thinking of using Cava or PAR to make it a single package.

    I haven't build a package yet and I am a newbie. You can conribute to the project by building up a package if you find yourself free.

Re^2: Terminal based Offline Dictionary in Perl
by Anonymous Monk on Mar 12, 2014 at 07:51 UTC
      Thank you for the feedback.

      I haven't looked at the Net::Dict interface. I will try to add features. I am trying to port it to the other languages and make it useful.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1077982]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-20 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found