1 | #!/opt/bin/perl |
1 | #!/opt/bin/perl |
2 | |
2 | |
3 | # cfmap2html - convert deliantra maps to html |
3 | # cfmap2html - convert deliantra maps to html |
4 | # Copyright (C) 2005,2007,2008 Marc Lehmann <cfmaps@schmorp.de> |
4 | # Copyright (C) 2005,2007,2008,2009 Marc Lehmann <cfmaps@schmorp.de> |
5 | # |
5 | # |
6 | # CFMAP2HTML is free software; you can redistribute it and/or modify |
6 | # CFMAP2HTML is free software; you can redistribute it and/or modify |
7 | # it under the terms of the GNU General Public License as published by |
7 | # it under the terms of the GNU General Public License as published by |
8 | # the Free Software Foundation; either version 2 of the License, or |
8 | # the Free Software Foundation; either version 2 of the License, or |
9 | # (at your option) any later version. |
9 | # (at your option) any later version. |
… | |
… | |
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 cfmaps; if not, write to the Free Software |
17 | # along with cfmaps; 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 = '2.112'; |
20 | our $VERSION = '2.122'; |
21 | |
21 | |
22 | use strict; |
22 | use strict; |
23 | |
23 | |
24 | use List::Util qw(min max); |
24 | use List::Util qw(min max); |
25 | use Deliantra; |
25 | use Deliantra; |
… | |
… | |
124 | |
124 | |
125 | print "<p class='m'>", |
125 | print "<p class='m'>", |
126 | escape_html delete $info->{msg}, |
126 | escape_html delete $info->{msg}, |
127 | "</p>"; |
127 | "</p>"; |
128 | |
128 | |
|
|
129 | if (open my $fh, "<", "$base.png.err") { |
|
|
130 | local $/; |
|
|
131 | print "<p class='m'>", |
|
|
132 | (escape_html scalar <$fh>), |
|
|
133 | "</p>"; |
|
|
134 | } |
|
|
135 | |
129 | print "<table class='i'>", |
136 | print "<table class='i'>", |
130 | (map "<tr><td>" . (escape_html $_) . "</td><td>" . (escape_html $info->{$_}) . "</td></tr>", |
137 | (map "<tr><td>" . (escape_html $_) . "</td><td>" . (escape_html $info->{$_}) . "</td></tr>", |
131 | grep !/^_/, keys %$info), |
138 | grep !/^_/, keys %$info), |
132 | "</table>", |
139 | "</table>", |
133 | "<p />"; |
140 | "<p />"; |