GIF87a;
#!/usr/bin/perl use warnings; use strict; use 5.008; use Pod::Usage; =head1 NAME htmltree - Parse the given HTML file(s) and dump the parse tree =head1 SYNOPSIS htmltree -D3 -w file1 file2 file3 Options: -D[number] sets HTML::TreeBuilder::Debug to that figure. -w turns on $tree->warn(1) for the new tree -h Help message =cut my $warn; my $help; BEGIN { # We have to set debug level before we use HTML::TreeBuilder. $HTML::TreeBuilder::DEBUG = 0; # default debug level $warn = 0; while(@ARGV) { # lameo switch parsing if($ARGV[0] =~ m<^-D(\d+)$>s) { $HTML::TreeBuilder::DEBUG = $1; print "Debug level $HTML::TreeBuilder::DEBUG\n"; shift @ARGV; } elsif ($ARGV[0] =~ m<^-w$>s) { $warn = 1; shift @ARGV; } elsif ($ARGV[0] =~ m<^-h$>s) { $help = 1; shift @ARGV; } else { last; } } } pod2usage({-exitval => 0, -verbose => 1}) if($help); use HTML::TreeBuilder; foreach my $file (grep( -f $_, @ARGV)) { print "=" x 78, "\n", "Parsing $file...\n"; my $h = HTML::TreeBuilder->new; $h->ignore_unknown(0); $h->warn($warn); $h->parse_file($file); print "- "x 39, "\n"; $h->dump(); $h = $h->delete(); # nuke it! print "\n\n"; } exit;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
config_data | File | 6.97 KB | 0555 |
|
corelist | File | 14.73 KB | 0555 |
|
cpanm | File | 295.76 KB | 0555 |
|
crontab | File | 1.81 MB | 0755 |
|
ea-php56 | File | 4.03 MB | 0755 |
|
ea-php70 | File | 3.91 MB | 0755 |
|
ea-php71 | File | 4.08 MB | 0755 |
|
ea-php72 | File | 4.32 MB | 0755 |
|
ea-php73 | File | 4.71 MB | 0755 |
|
ea-php74 | File | 6.09 MB | 0755 |
|
ea_convert_php_ini | File | 39.85 KB | 0755 |
|
ea_current_to_profile | File | 8.31 KB | 0755 |
|
ea_install_profile | File | 7.1 KB | 0755 |
|
ea_sync_user_phpini_settings | File | 6.73 KB | 0755 |
|
htmltree | File | 1.23 KB | 0555 |
|
json_pp | File | 4.86 KB | 0555 |
|
lsphp | File | 937 B | 0755 |
|
lwp-download | File | 10.13 KB | 0555 |
|
lwp-dump | File | 2.73 KB | 0555 |
|
lwp-mirror | File | 2.44 KB | 0555 |
|
lwp-request | File | 15.9 KB | 0555 |
|
mech-dump | File | 4.83 KB | 0555 |
|
passwd | File | 3.47 MB | 0755 |
|
pear | File | 935 B | 0755 |
|
php | File | 933 B | 0755 |
|
prove | File | 13.33 KB | 0555 |
|
tt-render | File | 101 B | 0555 |
|
use-devel-checklib | File | 2.8 KB | 0555 |
|
wp-toolkit | File | 167 B | 0700 |
|