… | |
… | |
15 | # |
15 | # |
16 | # You should have received a copy of the GNU General Public License |
16 | # You should have received a copy of the GNU General Public License |
17 | # along with gvpe; if not, write to the Free Software |
17 | # along with gvpe; if not, write to the Free Software |
18 | # Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 | # Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
19 | |
19 | |
20 | our $VERSION = '1.03'; |
20 | our $VERSION = '1.031'; |
21 | |
21 | |
22 | use Storable; |
22 | use Storable; |
23 | |
23 | |
24 | my $T = 50; |
24 | my $T = 50; |
25 | |
25 | |
26 | my @W = (100..129); |
26 | my @W = (100..129); |
27 | my @H = (100..129); |
27 | my @H = (100..129); |
28 | |
28 | |
|
|
29 | my $DIR = $ARGV[0] || "world"; |
|
|
30 | |
29 | open my $fh, ">:utf8", "world/index.xhtml" |
31 | open my $fh, ">:utf8", "$DIR/index.xhtml" |
30 | or die "index.xhtml: $!"; |
32 | or die "index.xhtml: $!"; |
31 | |
33 | |
32 | select $fh; |
34 | select $fh; |
33 | |
35 | |
34 | print "<?xml version='1.0' encoding='utf-8'?>", |
36 | print "<?xml version='1.0' encoding='utf-8'?>", |
|
|
37 | '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', |
35 | "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>", |
38 | "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>", |
36 | "<head>", |
39 | "<head>", |
37 | "<title>Crossfire Worldmap</title>", |
40 | "<title>Crossfire Worldmap</title>", |
38 | "<link rel='stylesheet' type='text/css' media='all' href='/common.css'/>\n", |
41 | "<link rel='stylesheet' type='text/css' media='all' href='/common.css'/>\n", |
39 | "</head>", |
42 | "</head>", |
… | |
… | |
45 | print "<td><a href='world_$x\_$y.xhtml'><img src='world_$x\_$y.jpg'/></a></td>"; |
48 | print "<td><a href='world_$x\_$y.xhtml'><img src='world_$x\_$y.jpg'/></a></td>"; |
46 | } |
49 | } |
47 | print "</tr>"; |
50 | print "</tr>"; |
48 | } |
51 | } |
49 | |
52 | |
50 | print "</table><p class='footer'>created by <a href='http://software.schmorp.de/#crossfire'>cfworldmap</a> version $VERSION</p></body></html>"; |
53 | print "</table><p class='footer'>created by <a href='http://software.schmorp.de/pkg/crossfire'>cfworldmap</a> version $VERSION</p></body></html>"; |
51 | |
54 | |
52 | close $fh; |
55 | close $fh; |
53 | |
56 | |
54 | system "gzip", "-7f", "world/index.xhtml"; |
57 | #system "gzip", "-7f", "$DIR/index.xhtml"; |
55 | |
58 | |