added a query routine
[spider.git] / perl / dbtest.pl
index 51a5c4d02f61d17ecec799830d8a00e9dc7db31e..6951c76dbf041276d93227e3d8b54c390e6bf302 100755 (executable)
@@ -18,6 +18,18 @@ use DXDebug;
 use ARRL::DX;
 
 
-my $dx = ARRL::DX->new;
+while (@ARGV) {
+       my $fn = shift;
+       if ($fn eq '-d') {
+               ARRL::DX::drop();
+               next;
+       }
+       print "Processing $fn ";
+       my $dx = ARRL::DX->new(file=>$fn);
+       my $c = $dx->process;
+       print "$c paragraphs\n";
+}
+
+ARRL::DX::close();
 
 exit 0;