blob: 424496c26e429a0661f4372f951efd0326cc887b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/perl
use Text::Template;
system("[ -d target ] || mkdir target");
#*.htm *.pdf
system("cp -pr docs css imgs *.gif *.jpg *.png *js target/");
*Q::include = \&Text::Template::_load_text;
foreach my $file ( glob("*.html") ) {
warn "$file\n";
my $t = new Text::Template( TYPE=>'FILE', SOURCE=>$file );
open(TARGET,">target/$file") or die $!;
print TARGET $t->fill_in(PACKAGE=>'Q');
close TARGET or die $!;
}
|