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 |
2 | |
19 | |
3 | use Storable; |
20 | use Storable; |
4 | |
21 | |
5 | my $LIBDIR = $ENV{CROSSFIRE_LIBDIR} |
22 | my $LIBDIR = $ENV{CROSSFIRE_LIBDIR} |
6 | or die "\$CROSSFIRE_LIBDIR must be set\n"; |
23 | or die "\$CROSSFIRE_LIBDIR must be set\n"; |
… | |
… | |
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 | |
77 | print "</table><hr/><p style='font-size: 6pt'>created by <b>cfarch2html</b> version $VERSION</p>", |
94 | print "</table><hr/><p style='font-size: 8pt'>created by <b>cfarch2html</b> version $VERSION</p>", |
78 | "</body></html>"; |
95 | "</body></html>"; |
79 | |
96 | |
80 | close $fh; |
97 | close $fh; |
81 | |
98 | |
82 | system "gzip", "-7f", "archetypes.html"; |
99 | system "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 | |
|
|