/[swish]/trunk/spider/progspider
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/spider/progspider

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 92 by dpavlin, Mon Nov 22 17:09:23 2004 UTC revision 95 by dpavlin, Sun Apr 24 16:33:53 2005 UTC
# Line 7  use File::Which; Line 7  use File::Which;
7  my $collection;         # name which will be inserted  my $collection;         # name which will be inserted
8  my $path_add;           # add additional info in path  my $path_add;           # add additional info in path
9  my $verbose;  my $verbose;
10    my $exclude;
11    
12  #$verbose = 1;  #$verbose = 1;
13    
# Line 15  my $result = GetOptions( Line 16  my $result = GetOptions(
16          "path=s" => \$path_add,          "path=s" => \$path_add,
17          "verbose!" => \$verbose,          "verbose!" => \$verbose,
18          "debug!" => \$verbose,          "debug!" => \$verbose,
19            "exclude=s" => \$exclude,
20  );  );
21    
22  my $dir = shift @ARGV || die "usage: $0 [dir]";  my $dir = shift @ARGV || die "usage: $0 [dir]";
# Line 38  find({ wanted => \&file, Line 40  find({ wanted => \&file,
40  sub dump_contents($$$) {  sub dump_contents($$$) {
41          my ($contents,$mtime,$path) = @_;          my ($contents,$mtime,$path) = @_;
42    
43          return if (! $contents);        # don't die on empty files          return unless ($contents);      # don't die on empty files
44    
45            if ($exclude && $path =~ m/$exclude/i) {
46                    print STDERR "skip: $path\n" if ($verbose);
47                    return;
48            }
49    
50          use bytes;          use bytes;
51          my $size = length $contents;          my $size = length $contents;

Legend:
Removed from v.92  
changed lines
  Added in v.95

  ViewVC Help
Powered by ViewVC 1.1.26