ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cfmaps/cfarch2html
(Generate patch)

Comparing cfmaps/cfarch2html (file contents):
Revision 1.2 by root, Fri Nov 18 12:34:13 2005 UTC vs.
Revision 1.6 by root, Sun Nov 20 01:05:34 2005 UTC

1#!/opt/bin/perl 1#!/opt/bin/perl
2
3# cfarch2html - convert crossfire archetypes to html
4# Copyright (C) 2005 Marc Lehmann <gvpe@schmorp.de>
5#
6# CFARCH2HTML is free software; you can redistribute it and/or modify
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
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with gvpe; if not, write to the Free Software
18# Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20our $VERSION = '1.01';
2 21
3use Storable; 22use Storable;
4 23
5my $LIBDIR = $ENV{CROSSFIRE_LIBDIR} 24my $LIBDIR = $ENV{CROSSFIRE_LIBDIR}
6 or die "\$CROSSFIRE_LIBDIR must be set\n"; 25 or die "\$CROSSFIRE_LIBDIR must be set\n";
7
8our $VERSION = '1.0';
9 26
10my $arch; 27my $arch;
11 28
12sub escape_html($) { 29sub escape_html($) {
13 local $_ = shift; 30 local $_ = shift;
58 print "more =>\n"; 75 print "more =>\n";
59 print_arch ($a->{more}); 76 print_arch ($a->{more});
60 } elsif ($_ eq "other_arch") { 77 } elsif ($_ eq "other_arch") {
61 print "$_ => <a href='#", (lc $a->{$_}), "'>$v</a>\n"; 78 print "$_ => <a href='#", (lc $a->{$_}), "'>$v</a>\n";
62 } elsif ($_ eq "msg" || $_ eq "lore") { 79 } elsif ($_ eq "msg" || $_ eq "lore") {
63 print "<p class='m'>$v</p>"; 80 print "$_ =><p class='m'>$v</p>";
64 } else { 81 } else {
65 print "$_ => $v\n"; 82 print "$_ => $v\n";
66 } 83 }
67 print "</li>"; 84 print "</li>";
68 } 85 }
72 print "<tr valign='top'><th align='left'><a name='", (lc $name), "'>$name</a></th><td>"; 89 print "<tr valign='top'><th align='left'><a name='", (lc $name), "'>$name</a></th><td>";
73 print_arch $arch->{$name}; 90 print_arch $arch->{$name};
74 print "</td></tr>"; 91 print "</td></tr>";
75} 92}
76 93
77print "</table><hr/><p style='font-size: 6pt'>created by <b>cfarch2html</b> version $VERSION</p>", 94print "</table><hr/><p style='font-size: 8pt'>created by <a href='http://software.schmorp.de/#crossfire'>cfarch2html</a> version $VERSION</p>",
78 "</body></html>"; 95 "</body></html>";
79 96
80close $fh; 97close $fh;
81 98
82system "gzip", "-7f", "archetypes.html"; 99system "gzip", "-7f", "archetypes.html";
83__END__
84
85 print_archs $as;
86 print "</div></span>";
87 }
88 print "</td>";
89 }
90 print "</tr>";
91}
92
93}
94

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines