diff options
author | dakkar <dakkar@thenautilus.net> | 2010-11-23 22:52:49 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2010-11-23 22:52:49 +0000 |
commit | 396d371b4c2798a1a7137274de68c271a7c86616 (patch) | |
tree | 79979a81c16edb5f63c41fb1df6fad38f4609a6e /script | |
parent | filler! (diff) | |
download | qr-builder-396d371b4c2798a1a7137274de68c271a7c86616.tar.gz qr-builder-396d371b4c2798a1a7137274de68c271a7c86616.tar.bz2 qr-builder-396d371b4c2798a1a7137274de68c271a7c86616.zip |
the filler works, and we have two printers
Diffstat (limited to 'script')
-rw-r--r-- | script/qr-color.pl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/script/qr-color.pl b/script/qr-color.pl index 45c47ee..0f779a9 100644 --- a/script/qr-color.pl +++ b/script/qr-color.pl @@ -2,24 +2,32 @@ use strict; use warnings; use Text::QRCode; -use TextPrinter; +use TextPrinter::ColourGrid; +use TextPrinter::StarGrid; use GridFiller; use Path::Class; +use Log::Log4perl qw(:easy); +Log::Log4perl->easy_init($INFO); my $data='MECARD:N:Ceccarelli,Gianni;TEL:+447564023056;EMAIL:dakkar@thenautilus.net;URL:http://www.thenautilus.net/contacts/;NICKNAME:dakkar;;'; +$data = 'x'; my $qr=Text::QRCode->new( - level=>'H', + level=>'L', mode=>'8-bit', ); my $arr=$qr->plot($data); my @words = grep { length($_) > 2 } - file('/usr/share/dict/words')->slurp(chomp=>1); + file('/usr/share/dict/propernames')->slurp(chomp=>1); my $filler=GridFiller->new({words=>\@words,grid=>$arr}); $filler->fill; -TextPrinter::draw_whole($filler->result,1); +TextPrinter::ColourGrid->new->draw_whole($filler->result,1); + +print "\n\n"; + +TextPrinter::StarGrid->new->draw_whole($arr,1); |