139 |
############################################################################## |
############################################################################## |
140 |
## reading user input from $infos |
## reading user input from $infos |
141 |
## |
## |
|
@PARAM = @ARGV; # we keep this for backward compatibility with an old version |
|
|
# of the slidemaker tool |
|
|
#when the parameters were in Makefile or make.bat |
|
|
|
|
142 |
my @file; |
my @file; |
143 |
|
|
144 |
############################################################################## |
############################################################################## |
162 |
} |
} |
163 |
############################################################################## |
############################################################################## |
164 |
|
|
165 |
|
parse_infos(@ARGV); # backward compatibility and for pack |
166 |
|
|
167 |
# read parameters from infos.txt and put them in @PARAM |
# read parameters from infos.txt and put them in @PARAM |
168 |
if (open(INFOS, $infos)) { |
if (open(INFOS, $infos)) { |
169 |
print STDERR "--- Reading parameters file $infos ---\n"; |
print STDERR "--- Reading parameters file $infos ---\n"; |
393 |
date => $date, |
date => $date, |
394 |
|
|
395 |
toc_title => $loc_toc, |
toc_title => $loc_toc, |
396 |
template => $template, |
template_dir => "$template/", |
397 |
); |
); |
398 |
|
|
399 |
} |
} |
410 |
$overview_data{toc_entries} = [ @toc_entries ]; |
$overview_data{toc_entries} = [ @toc_entries ]; |
411 |
|
|
412 |
my $page= new Text::FastTemplate key => 'overview'; |
my $page= new Text::FastTemplate key => 'overview'; |
413 |
|
$page_data{template_dir}='' if ($pack); |
414 |
print FOO $page->output( \%overview_data ); |
print FOO $page->output( \%overview_data ); |
415 |
|
|
416 |
close(FOO); |
close(FOO); |
599 |
|
|
600 |
slide_html => $slide_html, |
slide_html => $slide_html, |
601 |
|
|
602 |
template => $template, |
template_dir => "$template/", |
603 |
); |
); |
604 |
|
|
605 |
my $page; |
my $page; |
608 |
} else { |
} else { |
609 |
$page= new Text::FastTemplate key => 'title'; |
$page= new Text::FastTemplate key => 'title'; |
610 |
} |
} |
611 |
|
$page_data{template_dir}='' if ($pack); |
612 |
print SLIDE $page->output( \%page_data ); |
print SLIDE $page->output( \%page_data ); |
613 |
extract_files($page->output( \%page_data )) if ($pack); |
extract_files($page->output( \%page_data )) if ($pack); |
614 |
close(SLIDE); |
close(SLIDE); |
732 |
|
|
733 |
sub extract_files { |
sub extract_files { |
734 |
my $tmp = $_[0]; |
my $tmp = $_[0]; |
735 |
while ($tmp =~ s/<a\s+href="*([^"\s]+)"*//ism || |
while ($tmp =~ s/href="*([^"\s]+)"*//ism || |
736 |
$tmp =~ s/<img\s+src="*([^"\s]+)"*//ism) { |
$tmp =~ s/src="*([^"\s]+)"*//ism) { |
737 |
if ("$1" !~ m/[hf]t?tp:/ && -f "$1" && !grep(/$1/,@pack_additional)) { |
if ("$1" !~ m/[hf]t?tp:/ && -f "$1" && !grep(/$1/,@pack_additional)) { |
738 |
push @pack_additional,$1; |
push @pack_additional,$1; |
739 |
} |
} |