--- burst.pl 2001/09/04 23:10:55 1.19 +++ burst.pl 2001/09/18 12:44:15 1.20 @@ -428,6 +428,7 @@ my ($title,$subtitle,$nr) = @_; $title =~ s/\r//ig; # remove the windows CR+LF $title =~ s/<[^>]+>//g; + $subtitle =~ s/<[^>]+>//g; if (! $title) { return 1; @@ -610,9 +611,14 @@ } else { $page= new Text::FastTemplate key => 'title'; } - $page_data{template_dir}='' if ($pack); - print SLIDE $page->output( \%page_data ); - extract_files($page->output( \%page_data )) if ($pack); + + if ($pack) { + $page_data{template_dir}=''; + print SLIDE extract_files($page->output( \%page_data )); + } else { + print SLIDE $page->output( \%page_data ); + } + close(SLIDE); return 0; } @@ -730,16 +736,22 @@ } ############################################################################## -# extract files referenced in presentation +# extract files referenced in presentation and remove dirs from slide html sub extract_files { - my $tmp = $_[0]; + my $tmp = $slide = $_[0]; while ($tmp =~ s/href="*([^"\s]+)"*//ism || $tmp =~ s/src="*([^"\s]+)"*//ism) { if ("$1" !~ m/[hf]t?tp:/ && -f "$1" && !grep(/$1/,@pack_additional)) { - push @pack_additional,$1; + my $file=$1; + push @pack_additional,$file; + if ($file =~ m,^(.+)/([^/]+),) { + my ($d,$f) = ($1,$2); + $slide =~ s,${d}/${f},${f},g; + } } } + return $slide; } ##############################################################################