--- trunk/spider/progspider 2004/11/22 17:09:23 92 +++ trunk/spider/progspider 2005/04/24 16:33:53 95 @@ -7,6 +7,7 @@ my $collection; # name which will be inserted my $path_add; # add additional info in path my $verbose; +my $exclude; #$verbose = 1; @@ -15,6 +16,7 @@ "path=s" => \$path_add, "verbose!" => \$verbose, "debug!" => \$verbose, + "exclude=s" => \$exclude, ); my $dir = shift @ARGV || die "usage: $0 [dir]"; @@ -38,7 +40,12 @@ sub dump_contents($$$) { my ($contents,$mtime,$path) = @_; - return if (! $contents); # don't die on empty files + return unless ($contents); # don't die on empty files + + if ($exclude && $path =~ m/$exclude/i) { + print STDERR "skip: $path\n" if ($verbose); + return; + } use bytes; my $size = length $contents;