/[PLies]/burst.pl
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 /burst.pl

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

revision 1.19 by dpavlin, Tue Sep 4 23:10:55 2001 UTC revision 1.20 by dpavlin, Tue Sep 18 12:44:15 2001 UTC
# Line 428  sub addTitle Line 428  sub addTitle
428          my ($title,$subtitle,$nr) = @_;          my ($title,$subtitle,$nr) = @_;
429          $title =~ s/\r//ig;      # remove the windows CR+LF          $title =~ s/\r//ig;      # remove the windows CR+LF
430          $title =~ s/<[^>]+>//g;          $title =~ s/<[^>]+>//g;
431            $subtitle =~ s/<[^>]+>//g;
432    
433          if (! $title) {          if (! $title) {
434                  return 1;                  return 1;
# Line 610  sub createSlide Line 611  sub createSlide
611          } else {          } else {
612                  $page= new Text::FastTemplate key => 'title';                  $page= new Text::FastTemplate key => 'title';
613          }          }
614          $page_data{template_dir}='' if ($pack);  
615          print SLIDE $page->output( \%page_data );          if ($pack) {
616          extract_files($page->output( \%page_data )) if ($pack);                  $page_data{template_dir}='';
617                    print SLIDE extract_files($page->output( \%page_data ));
618            } else {
619                    print SLIDE $page->output( \%page_data );
620            }
621    
622          close(SLIDE);          close(SLIDE);
623          return 0;          return 0;
624  }  }
# Line 730  sub remove_anchor { Line 736  sub remove_anchor {
736  }  }
737    
738  ##############################################################################  ##############################################################################
739  # extract files referenced in presentation  # extract files referenced in presentation and remove dirs from slide html
740    
741  sub extract_files {  sub extract_files {
742          my $tmp = $_[0];          my $tmp = $slide = $_[0];
743          while ($tmp =~ s/href="*([^"\s]+)"*//ism ||          while ($tmp =~ s/href="*([^"\s]+)"*//ism ||
744                  $tmp =~ s/src="*([^"\s]+)"*//ism) {                  $tmp =~ s/src="*([^"\s]+)"*//ism) {
745                  if ("$1" !~ m/[hf]t?tp:/ && -f "$1" && !grep(/$1/,@pack_additional)) {                  if ("$1" !~ m/[hf]t?tp:/ && -f "$1" && !grep(/$1/,@pack_additional)) {
746                          push @pack_additional,$1;                          my $file=$1;
747                            push @pack_additional,$file;
748                            if ($file =~ m,^(.+)/([^/]+),) {
749                                    my ($d,$f) = ($1,$2);
750                                    $slide =~ s,${d}/${f},${f},g;
751                            }
752                  }                  }
753          }          }
754            return $slide;
755  }  }
756    
757  ##############################################################################  ##############################################################################

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.26