###################### # Copyright © 2000 Portal Scripts. # All Rights Reserved. # # The original developer of this software module and his/her company, the subsequent # editors and their companies, have no liability for use of this # software module or modifications thereof in an implementation. # # Permission to use, copy, and modify this software and its documentation on # the server of the customer is hereby granted, provided that the above copyright # notice, this paragraph and the following two paragraphs appear in all # copies. # # This software program and documentation are copyrighted by Portal Scripts. # The software program and documentation are supplied "as is", without any # accompanying services. Portal Scripts does not # warrant that the operation of the program will be # uninterrupted or error-free. # # IN NO EVENT SHALL PORTAL SCRIPTS BE LIABLE TO ANY PARTY FOR # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING # LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION. # ###################### use strict; use vars qw(%CONFIG); sub dirextract { my $odpurl = shift(@_); my $html = get $odpurl; my $html_source = $html; $html =~ s#
##is; $html =~ s##i){ $forminfo = 0; } if($line =~ m#Top:#i){ $maininfo = 1; } elsif($line =~ m#
#i){ $maininfo = 0; } if($line =~ m#$#i){ $cat_extra_info = 1; } elsif($line =~ m#
#i){ $cat_extra_info+=10; if($cat_extra_info == 11){ $catinfo--; } } if($line =~ m##i){ $catinfo++; } elsif($line =~ m#
#i){ $catinfo++; } if($line =~ m#

See also:

$#i) && ($relatedinfo == 1) ){ $relatedinfo *= 10; } if($line =~ m#^
#i){ $listingsinfo *= 10; } if($line =~ m#
#i){ $newsgroupinfo++; $listingsinfo = 1000; } elsif($line =~ m#^$#i && ($newsgroupinfo == 1) ){ $newsgroupinfo *= 10; } if($line =~ m##i){ $outsearchinfo++; } elsif($line =~ m#^$#i){ $outsearchinfo *= 10; } if($line =~ m#See also:##is; } if($listings ne ""){ $listings .= "\n"; } if($newsgroup ne ""){ $newsgroup .= "
\n"; } if($outsearch ne ""){ $outsearch .= "
\n"; } if($editors ne ""){ $editors =~ s#(.*).*?$#$1#i; } $main =~ s#
[^<]+
[^<]+
##is; $main =~ s#
[^<]+
##is; $main =~ s#(
\s*?\[.*?\]\s*?
)##is; $alphabar = $1; $main =~ s#]*>##igs; $main =~ s#]*>##gis; $main =~ s#]*>##igs; $main =~ s###igs; $main =~ s#Top:#$CONFIG{'TOP_TEXT'}#s; $listings =~ s#
  • #
  • #igs; $cat_extra =~ s#
  • #
  • Category#igs; $cat1 =~ s#
  • #
  • Category#igs; $cat2 =~ s#
  • #
  • Category#igs; return ($html_source, $form, $main, $alphabar, $cat_extra, $cat1, $cat2, $related, $listings, $newsgroup, $outsearch, $editors); } 1;