From 396d371b4c2798a1a7137274de68c271a7c86616 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 23 Nov 2010 22:52:49 +0000 Subject: the filler works, and we have two printers --- script/qr-color.pl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'script') 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); -- cgit v1.2.3