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

Comparing cfmaps/cfarch2html (file contents):
Revision 1.6 by root, Sun Nov 20 01:05:34 2005 UTC vs.
Revision 1.8 by root, Sun Nov 20 05:02:58 2005 UTC

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
20our $VERSION = '1.01'; 20our $VERSION = '1.03';
21 21
22use Storable; 22use Storable;
23 23
24my $LIBDIR = $ENV{CROSSFIRE_LIBDIR} 24my $LIBDIR = $ENV{CROSSFIRE_LIBDIR}
25 or die "\$CROSSFIRE_LIBDIR must be set\n"; 25 or die "\$CROSSFIRE_LIBDIR must be set\n";
32 $_ 32 $_
33} 33}
34 34
35$arch = Storable::retrieve "$LIBDIR/archetypes.pst"; 35$arch = Storable::retrieve "$LIBDIR/archetypes.pst";
36 36
37open my $fh, ">:utf8", "archetypes.html" 37open my $fh, ">:utf8", "arc.xhtml"
38 or die "archetypes.html: $!"; 38 or die "arc.xhtml: $!";
39 39
40select $fh; 40select $fh;
41 41
42my $W = $meta->{width} * $T; 42my $W = $meta->{width} * $T;
43my $H = $meta->{height} * $T; 43my $H = $meta->{height} * $T;
44 44
45my (@path) = split /\//, $path; 45my (@path) = split /\//, $path;
46 46
47print "<?xml version='1.0' encoding='utf-8'?>",
47print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">", 48 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">",
48 "<html>", 49 "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>",
49 "<head>", 50 "<head>",
50 "<title>Crossfire Archetypes</title>", 51 "<title>Crossfire Archetypes</title>",
51 "<style type='text/css'><!--\n", 52 "<link rel='stylesheet' type='text/css' media='all' href='/common.css'/>",
52 "body { background: white; text-color: black; }\n",
53 "a { text-color: blue; }\n",
54 "a:hover { text-color: red; }\n",
55 "a:visited { text-color: #008; }\n",
56
57 "li { white-space: pre; }\n",
58 "p.m { white-space: pre; margin-left: 2em; background: #ddd; padding: 2px; border: 1px solid black; }\n",
59 "-->\n</style>",
60 "</head>", 53 "</head>",
61 "<body>", 54 "<body>",
62 "<h1>Crossfire Archetypes</h1>"; 55 "<h1>Crossfire Archetypes</h1>";
63 56
64print "<table>"; 57print "<table>";
84 print "</li>"; 77 print "</li>";
85 } 78 }
86 print "</ul>"; 79 print "</ul>";
87} 80}
88for my $name (sort keys %$arch) { 81for my $name (sort keys %$arch) {
89 print "<tr valign='top'><th align='left'><a name='", (lc $name), "'>$name</a></th><td>"; 82 print "<tr valign='top'><th align='left'><a id='", (lc $name), "'>$name</a></th><td>";
90 print_arch $arch->{$name}; 83 print_arch $arch->{$name};
91 print "</td></tr>"; 84 print "</td></tr>";
92} 85}
93 86
94print "</table><hr/><p style='font-size: 8pt'>created by <a href='http://software.schmorp.de/#crossfire'>cfarch2html</a> version $VERSION</p>", 87print "</table><p class='footer'>created by <a href='http://software.schmorp.de/#crossfire'>cfarch2html</a> version $VERSION</p>",
95 "</body></html>"; 88 "</body></html>";
96 89
97close $fh; 90close $fh;
98 91
99system "gzip", "-7f", "archetypes.html"; 92system "gzip", "-7f", "arc.xhtml";
93

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines