Mike Jacoubowsky wrote:
> Does anybody know of a utility that lists all of your .htm/.html files,
> along with their descriptions, so I can try and get a handle on all this?
I put this together a while ago. You can get Perl via
<http://www.perl.org/>. It prints out information about all the meta data,
adding an if statement can limit it to just the description.
Call it with something like:
perl myscript.pl *.html
Program starts:
#!/usr/bin/perl
use strict;
use HTML::TreeBuilder 3;
#######################################
#
# Extracts meta tags from HTML documents
# and displays their content.
#
#######################################
foreach my $file_name (@ARGV) {
my $tree = HTML::TreeBuilder->new;
$tree->parse_file($file_name);
my @meta = $tree->find_by_tag_name('meta');
print $file_name . "\n";
for (@meta) {
print $_->attr('name') . $_->attr('http-equiv') . ' = ';
print $_->attr('content') . "\n";
}
print "----------------------------------\n\n";
$tree = $tree->delete;
}
--
David Dorward <a style='text-decoration: underline;' href="http://dorward.me.uk/" target="_blank">http://dorward.me.uk/</a><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: utility to show all .html files w/descriptions?