/[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 68 by dpavlin, Thu Mar 18 11:14:49 2004 UTC revision 72 by dpavlin, Tue Apr 6 15:06:58 2004 UTC
# Line 78  sub file { Line 78  sub file {
78    
79                  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>');
80    
81                  ($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);
82    
83                  $pre_html =~ s/<title>(.+?)<\/title>/<title>$1 :: page ##page_nr##<\/title>/si;                  if ($collection) {
84                            $pre_html =~ s/<title>(.+?)<\/title>/<title>$collection :: page ##page_nr##<\/title>/si;
85                    } else {
86                            $pre_html =~ s/<title>(.+?)<\/title>/<title>$1 :: page ##page_nr##<\/title>/si;
87                    }
88    
89                  my $page_nr = 1;                  my $page_nr = 1;
90                  foreach my $page (split(/\f/,$pages)) {                  foreach my $page (split(/\f/s,$pages)) {
91                            print STDERR " $page_nr" if ($verbose);
92                          my $pre_tmp = $pre_html;                          my $pre_tmp = $pre_html;
93                          $pre_tmp =~ s/##page_nr##/$page_nr<\/title>/s;                          $pre_tmp =~ s/##page_nr##/$page_nr<\/title>/s;
94                          dump_contents($pre_tmp . $page . $post_html,time(), $path) if ($page !~ m/^\s*$/s);                          dump_contents($pre_tmp . $page . $post_html,time(), $path) if ($page !~ m/^\s*$/s);

Legend:
Removed from v.68  
changed lines
  Added in v.72

  ViewVC Help
Powered by ViewVC 1.1.26