(Answer) (Category) Products of Aardvarks With Chisels : (Category) Linux : (Category) Handy shell scripts :
printimages.pl
#!/usr/bin/perl -w
#
# print a list of images in an HTML document
# I don't remember if this is an example from some page, or if I wrote
#  it - so I'm not gonna claim it.  It's kinda handy, though.  I think I
#  must've based it on one of the HTML::TokeParser examples.  I wonder if
#  it still works...  Maybe "lynx -source filename | printimages /dev/stdin"?
#
use HTML::TokeParser;
my $page = shift || die "Usage: $0 filename.html";
$p = HTML::TokeParser->new($page);

while (my $link = $p->get_tag("img")){
        my $url = $link->[1]{src} || 'none';
        my $text = $link->[1]{alt} || 'none';
        print "$url\t$text\n";
}

exit(0)
[Append to This Answer]
2000-Jul-12 1:13am
Previous: (Answer) pinghost
Next: (Answer) keepprocalive
This document is: http://www.cloudmaster.com/~sauer/projects/index.cgi?file=85
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
This FAQ administered by sauer@cloudmaster.com