ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/www/generate
(Generate patch)

Comparing deliantra/www/generate (file contents):
Revision 1.4 by pippijn, Sat Sep 15 15:22:17 2007 UTC vs.
Revision 1.5 by pippijn, Sun Sep 16 07:44:24 2007 UTC

2 2
3use strict; 3use strict;
4use warnings; 4use warnings;
5use utf8; 5use utf8;
6 6
7use Pod::POM;
7use Template; 8use Template;
8use YAML; 9use YAML;
9 10
10# Static variables 11# Static variables
11my $static = YAML::LoadFile "variables.yml"; 12my $static = YAML::LoadFile "variables.yml";
73 } 74 }
74} 75}
75 76
76generate "src", "html", @files; 77generate "src", "html", @files;
77generate "monsters", "html\/monsters", @monsters; 78generate "monsters", "html\/monsters", @monsters;
79
80my $parser = new Pod::POM;
81
82my $pom = $parser->parse ("src/news.pod")
83 or die $parser->error;
84open FH, ">", "html/news.html";
85print FH $pom->present ("PodHTML");
86close FH;
87
88$pom = $parser->parse ("src/news-archive.pod")
89 or die $parser->error;
90open FH, ">", "html/news-archive.html";
91print FH $pom->present ("PodHTML");
92close FH;
93
94
95package PodHTML;
96
97use strict;
98use warnings;
99use utf8;
100
101my $rcsid = '$Id: generate,v 1.5 2007/09/16 07:44:24 pippijn Exp $';
102
103use base "Pod::POM::View";
104
105our $subdir;
106our $dir;
107our $menu;
108
109sub view_pod {
110 my ($self, $item) = @_;
111 $item->content->present ($self)
112}
113
114sub view_head1 {
115 my ($self, $item) = @_;
116 "<p><em>", $item->title, " ", $item->content, "</em></p>"
117}
118
119=head1 AUTHOR
120
121Copyright © 2007 Pippijn van Steenhoven
122
123=head1 LICENSE
124
125This library is free software, you can redistribute it and/or modify
126it under the terms of the GNU General Public License.
127
128=cut
129
1301

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines