21 |
"skipoutput!" => \$skip_output, |
"skipoutput!" => \$skip_output, |
22 |
); |
); |
23 |
|
|
24 |
my $dir = shift @ARGV || die "usage: $0 [dir]"; |
die "usage: $0 [dir] ..." unless (@ARGV); |
25 |
|
|
26 |
my $basedir = $0; |
my $basedir = $0; |
27 |
$basedir =~ s,/[^/]+$,/,; |
$basedir =~ s,/[^/]+$,/,; |
34 |
|
|
35 |
print STDERR "using $pdftotext to convert pdf into html\n" if ($pdftotext && $verbose); |
print STDERR "using $pdftotext to convert pdf into html\n" if ($pdftotext && $verbose); |
36 |
|
|
37 |
find({ wanted => \&file, |
while (my $dir = shift @ARGV) { |
38 |
follow => 1, |
print STDERR "indexing $dir\n" if ($verbose); |
39 |
no_chdir => 1 |
|
40 |
}, $dir); |
find({ wanted => \&file, |
41 |
|
follow => 1, |
42 |
|
no_chdir => 1 |
43 |
|
}, $dir); |
44 |
|
} |
45 |
|
|
46 |
sub dump_contents($$$) { |
sub dump_contents($$$) { |
47 |
my ($contents,$mtime,$path) = @_; |
my ($contents,$mtime,$path) = @_; |