#!/usr/bin/perl my $i; my %info; my $myName = $0; my $metafile = undef; while (<>) { $metafile = $ARGV unless defined $metafile; if (/{{{/.../}}}/) { # print ">>>$_"; if (/<<>>/) { s/<<>>$/) { my ($anchor,$anchorEnd) = ("",""); ($anchor,$anchorEnd) = ("","") if !$first++; print "

$anchor"; print "\"[little MacGLQuake Version $info{Version}"; print " - $info{Date}\n"; print "$anchorEnd

\n"; print "$info{Header}\n"; my ($heading,$data,$text) = ("#1188ff","#7777cc","#ffffff\" LINK=\"#000000"); print "\n"; print "\n"; foreach my $title ("File","Download
Sites", "Requires","Description") { print " \n"; } print "\n"; my $descriptionIndex = undef; for (my $x=0;$x <= $#{@info{File}};$x++) { print "\n"; print " \n"; print " \n"; print " \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 "\n"; } print "
$title
".font("color=\"$text\"", center($info{File}[$x]{Name})); print " "; print font("color=\"$text\"", center(join("\n
or
\n ", @{$info{File}[$x]{Site}}))); print "\n
".font("color=\"$text\"", center($info{File}[$x]{Requires})); print "\n \n"; print font("color=\"$text\"", $info{File}[$descriptionIndex]{Description}); print "\n
\n"; print "$info{footer}\n\n"; foreach my $k (keys %info) { # printf STDERR "$k\n"; delete $info{$k}; } # printf STDERR "---\n"; } } else { print; } } print font("size=-1","Converted from $metafile by ". "$myName on ". `date +"%A %B %e, %Y at %r"`. "."); sub center { return "
$_[0]
"; } sub font { return "$_[1]"; }