#!/usr/bin/perl
# This file is part of the Skin Generator, Copyright (c) 2004 Alexander R. Pruss
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

$cols = 3;
$num  = @ARGV;

    print "<html>\n<head><title>Skin previews</title><body>\n";
    print "<h1>Skin previews</h1>\n";
    print '<table border="1" cellpadding="0" cellspacing="0">', "\n";
    $width = 100/$cols;
    $i     = 0;
    while ( $i < $num ) {
        print "<tr>\n";
        $j = 0;
        while ( $j < $cols and $i < $num ) {
            $iString = $ARGV[$i];
            print "<td width=$width%><p><img src=\"images/$iString.jpg\"></p>";
            print "$iString";
            print "</td>\n";
            $j++;
            $i++;
        }
        print "</tr>\n";
    }
    print "</table></body></html>\n";

