take parameters from command-line
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 15 Aug 2010 13:16:01 +0000 (15:16 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 15 Aug 2010 13:16:01 +0000 (15:16 +0200)
lib/Printer/EVOLIS.pm
scripts/inkscape-render.pl

index 17b503c..8a2f785 100644 (file)
@@ -27,6 +27,10 @@ front and back pages separatly.
 
 Current toolset sonsists of following scripts:
 
+=head2 scripts/inkscape-render card/template.svg 201008159999 Ime Prezime
+
+generate pbm files from Inkscape SVG template in C<card/>
+
 =head2 scripts/evolis-driver.pl front.pbm back.pbm > evolis.commands
 
 provides driver which generates printer commands
index 9df63e4..36be513 100755 (executable)
@@ -4,15 +4,11 @@ use warnings;
 use strict;
 use autodie;
 
-my $card_svg = 'card/ffzg-2010.svg';
+die "unsage: $0 card/template.svg 201008159999 Ime Prezime\n" unless @ARGV;
 
-warn "# card template: $card_svg\n";
+my ($card_svg,$nr,$ime,$prezime) = @ARGV;
 
-my ($nr,$ime,$prezime) = ( qw/
-200900000042
-Dobrica
-Pavlinušić
-/ );
+warn "# svg: $card_svg nr: $nr $ime $prezime\n";
 
 my $mapping = {
 '200908109999' => $nr,