14 print "process.pl command_file template_file directory_prefix\n";
20 open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
23 my @command = split /,/;
24 if ($command[0] != -1) {
26 $menu .= "<tr><td valign=\"top\" class=\"navi" . $command[0];
27 $menu .= "\"><a class=\"navi" . $command[0];
29 $menu .= " HREF=\"$command[2]\">$command[1]</a></td></tr>\n\n";
34 open TEMPLATE, $ARGV[1] || die "Can not open $ARGV[1]";
40 open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
43 my @command = split /,/;
45 if ($command[2] =~ /^http:/){
47 $n = $ARGV[2] . "/" . $command[2];
48 open OUTPUT, ">" . $n || die "Can not create $n";
51 open INPUT, "src/$command[3]" || die "Can not open $command[3]";
66 $script = $command[5];
68 foreach $line (@template) {
70 $title = "$tit / Mono";
71 $temp =~ s/#TITLE#/$title/;
72 $temp =~ s/#CONTENT#/$content/;
73 $temp =~ s/#MENU#/$menu/;
75 $temp =~ s/#CSS#/<link rel="stylesheet" type="text\/css" href="$css" \/>/;
81 $temp =~ s/#SCRIPT#/<script src="$script"><\/script>/;
83 $temp =~ s/#SCRIPT#//;