better output of command
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 17 Aug 2010 14:51:37 +0000 (16:51 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 17 Aug 2010 14:51:37 +0000 (16:51 +0200)
prefixed by ## (double hash)

scripts/evolis-driver.pl

index 2001917..146f94a 100755 (executable)
@@ -9,8 +9,10 @@ die "usage: $0 front.pbm back.pbm\n" unless $front;
 sub read_pbm;
 
 sub cmd {
-       warn "# @_\n";
-       print "\x1B",$_[0],"\r";
+       my ( $cmd, $description ) = @_;
+       print "\x1B",$cmd,"\r";
+       $cmd =~ s/^(Db[\w\d;]+).+/$1_/s;
+       warn sprintf "## %-10s %s\n", $cmd, $description;
 }
 
 cmd 'Pr;k' => 'ribbon: black';