#!/usr/local/bin/perl use File::stat ; use AnyDBM_File ; use subs qw( dir_map print_date resolve_query negative_result ) ; $initial_dir = '/home/stargate/a/sig/artemis/public-web' ; dir_map ( $initial_dir ); #The sad thing is, I could have easily #done this w/o ################################################################# # Everything really is a Subroutine # ################################################################# ################################################################# # The main part of this program sub dir_map { push @dirs , shift ; foreach $dir ( @dirs ) { $dir =~ s/\/\//\//go ; $inode = stat ( $dir ) ; open TDIR , "$dir" ; #If it's a Directory, collect the contents but no printing # ----------------------------------- if ( -d TDIR ) { close TDIR ; my @localdirs ; my $flag = 0 ; opendir ( DIR , "$dir" ) or die "Can't open $dir: $!" ; while ( defined ( $filename = readdir ( DIR ) ) ) { $flag = 1 if $filename =~ /^(\.nosearch)$/ ; push @localdirs , "$dir/$filename" unless $filename =~ /^\./ or $filename =~ /\.jpg/i or $filename =~ /img/i or $filename =~ /\.gif/i or $filename =~ /fig\d/i or $filename =~ /^gal\d\d\.htm/i or $filename =~ /^gal\w\d\.htm/i or $filename =~ /^(images)$/i ; } closedir DIR ; foreach ( sort @localdirs ) { #print qq(\t$flag\n) if $flag == 1 ; push @dirs , $_ if $flag == 0 ; } #If it's not a Directory, it is a file. Look for whtml and not index # ----------------------------------- } elsif ( $dir =~ /w?s?html?$/i ) { my $display ; $dir = ( split /public-web\// , $dir )[1] ; $dir =~ s/\/\//\//go ; my $text ; my %checker ; if ( -T TDIR ) { my $thing ; $text .= $_ while ; print STDERR "WARNING:\t$dir\n" if $text !~ //i ; $text =~ s[<title>\s*(.*)\s*][ $thing = $1 ]ie ; #if ( 1 ) { #things smaller than are images if ( $inode->size > 1300 ) { #things smaller than are images $thing =~ s/"//g; $thing .= " " while $big_list{$thing} ; $big_list{$thing} = $dir ; # $size{$thing} = $inode->size ; } } close TDIR ; } } } print< WAAW Site Map




Site Map
WAAW Home

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

EOF for ( sort {lc($a) cmp lc($b) } keys %big_list ) { $init = uc substr ( $_ , 0 ,1 ) ; $pinit = uc substr ( $prev , 0 ,1 ) ; print qq(\n

\n$init top

\n\n) if $pinit ne $init ; print qq($size{$_}) ; print qq(\n$_
\n\n) ; $prev = $_ ; } print< A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 

Main Index

Introduction · Enrollment · Contributors · Discussion · Search

 

Community

 

Identity

Syllabus

 

Spirituality

 

Locality

EOF