X-Git-Url: http://git.rot13.org/?p=Biblio-RFID.git;a=blobdiff_plain;f=scripts%2Fprogram.pl;fp=scripts%2Fprogram.pl;h=565bb2a178b0fa2648f354e2a2e1a3b75b130d1f;hp=b0fc125eec1c1c2d26c5d1579d1fb10d29ab85a7;hb=1601b02988d4067fafcf4ab936e0e416e3527d20;hpb=282b54550a8a651fe528648d40aa7c582d288511 diff --git a/scripts/program.pl b/scripts/program.pl index b0fc125..565bb2a 100755 --- a/scripts/program.pl +++ b/scripts/program.pl @@ -29,6 +29,10 @@ GetOptions( ) || die $!; my ( $sid, $content ) = @ARGV; +if ( $sid =~ m/.+,.+/ && ! defined $content ) { + ( $sid, $content ) = split(/,/, $sid); +} + die "usage: $0 [--reader regex_filter] [--afi 214] [--type 1] E0_RFID_SID [barcode]\n" unless $sid && ( $content || $afi || $blank ); $hash->{content} = $content if defined $content; @@ -38,7 +42,7 @@ $Biblio::RFID::debug = $debug; foreach my $tag ( $rfid->tags, $sid ) { warn "visible $tag\n"; -# next unless $tag eq $sid; + next unless $tag eq $sid; if ( grep { defined $_ } values %$blank ) { my $type = ( grep { $blank->{$_} } keys %$blank )[0]; warn "BLANK $type $tag\n";