#!/usr/bin/perl my $i; my %info; my $myName = $0; my $metafile = undef; while (<>) { $metafile = $ARGV unless defined $metafile; if (/{{{/.../}}}/) { # print ">>>$_"; if (/<<>>/) { s/<</; if (/^Version ([\d\.]+)[\s-]+(.+)$/) { # print "The Version: '$1'. The date: '$2'\n"; $info{Version}=$1; $info{Date}=$2; $i=undef; } if (/^File: (.*)$/) { $i++ if defined($i); $i=0 unless defined($i); $info{File}[$i]{Name}=$1; $s=undef; # print "Got File $i '$info{File}[$i]{Name}'\n"; } if (/^Site: (.*)$/) { $s++ if defined($s); $s=0 unless defined($s); $info{File}[$i]{Site}[$s]=$1; # print "Got Site $i $s '$info{File}[$i]{Site}[$s]'\n"; } if (/^Requires:/.../^---$/) { s/Requires:|---//; $info{File}[$i]{Requires} .= $_; # print "Got Requires $i '$info{File}[$i]{Requires}'\n"; } if (/^Description:/.../^---$/) { s/Description:|---//; $info{File}[$i]{Description} .= $_; # print "Got Description $i '$info{File}[$i]{Description}'\n"; } if (/^Header:/.../^---$/) { s/Header:|---//; $info{Header} .= $_; } if (/^Footer:/.../^---$/) { s/Footer:|---//; $info{Footer} .= $_; } } if (/^>>>$/) { my ($anchor,$anchorEnd) = ("",""); ($anchor,$anchorEnd) = ("","") if !$first++; print "
$title | \n"; } print "|||
---|---|---|---|
".font("color=\"$text\"", center($info{File}[$x]{Name})); print " | \n"; print " ";
print font("color=\"$text\"",
center(join("\n or \n ", @{$info{File}[$x]{Site}}))); print "\n | \n";
print " ".font("color=\"$text\"", center($info{File}[$x]{Requires})); print "\n | \n"; if (!defined($descriptionIndex) || $descriptionIndex < $x) { for (my $y=$x;$y <= $#{@info{File}};$y++) { if (defined($info{File}[$y]{Description})) { $rowspan = $y-$x+1; $descriptionIndex = $y; last; } } print "\n"; print font("color=\"$text\"", $info{File}[$descriptionIndex]{Description}); print "\n | \n"; } print "