print $log iso_date, ",$tag,$number\n";
$programmed->{$tag} = $number;
+ render_card; # pre-render next one
}
},
return $counters;
}
+sub render_card {
+ return unless @queue;
+ my @data = @{$queue[0]};
+ my $nr = $data[0];
+
+ if ( ! ( -e "out/$nr.front.pbm" && -e "out/$nr.front.pbm" ) ) {
+ print "RENDER @data\n";
+ system "$evolis_dir/scripts/inkscape-render.pl", "$evolis_dir/card/ffzg-2010.svg", @data;
+ }
+}
+
sub print_card {
if ( ! @queue ) {
} else {
- system "$evolis_dir/scripts/inkscape-render.pl", "$evolis_dir/card/ffzg-2010.svg", @data;
+ render_card;
system "$evolis_dir/scripts/evolis-driver.pl out/$nr.front.pbm out/$nr.back.pbm > /dev/usb/lp0";
}