/[swish]/trunk/spider/progspider
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/spider/progspider

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 80 by dpavlin, Tue Apr 6 15:06:58 2004 UTC revision 81 by dpavlin, Sat Aug 28 22:15:59 2004 UTC
# Line 1  Line 1 
1  #!/usr/local/bin/perl -w  #!/usr/bin/perl -w
2  use strict;  use strict;
3  use File::Find;  use File::Find;
4  use Getopt::Long;  use Getopt::Long;
# Line 50  sub dump_contents($$$) { Line 50  sub dump_contents($$$) {
50  Path-Name: $path  Path-Name: $path
51  Content-Length: $size  Content-Length: $size
52  Last-Mtime: $mtime  Last-Mtime: $mtime
53  Document-Type: HTML  Document-Type: html*
54    
55  EOF  EOF
56          print $contents;          print $contents;
# Line 76  sub file { Line 76  sub file {
76                  }                  }
77                  close(F);                  close(F);
78    
79                    return if (! $html);
80    
81                  my ($pre_html,$pages,$post_html) = ('<html><head><title>$path :: page ##page_nr##</title></head><body><pre>',$html,'</pre></body></html>');                  my ($pre_html,$pages,$post_html) = ('<html><head><title>$path :: page ##page_nr##</title></head><body><pre>',$html,'</pre></body></html>');
82    
83                  ($pre_html,$pages,$post_html) = ($1,$2,$3) if ($html =~ m/^(<html>.+?<pre>)(.+)(<\/pre>.+?)$/si);                  ($pre_html,$pages,$post_html) = ($1,$2,$3) if ($html =~ m/^(<html>.+?<pre>)(.+)(<\/pre>.+?)$/si);
# Line 97  sub file { Line 99  sub file {
99    
100          } else {          } else {
101    
102                  return if (! -f $path || ! m/\.html*$/i);                  return if (! -f $path || ! m/\.(html*|php|pl|txt|info|log|text)$/i);
103    
104                  # skip index files                  # skip index files
105                  return if (m/index_[a-z]\.html*/i || m/index_symbol\.html*/i);                  return if (m/index_[a-z]\.html*/i || m/index_symbol\.html*/i);

Legend:
Removed from v.80  
changed lines
  Added in v.81

  ViewVC Help
Powered by ViewVC 1.1.26