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

Comparing deliantra/www/generate (file contents):
Revision 1.13 by pippijn, Sun Sep 16 12:13:23 2007 UTC vs.
Revision 1.14 by pippijn, Sun Sep 16 12:25:35 2007 UTC

7use Pod::POM; 7use Pod::POM;
8use Template; 8use Template;
9use YAML; 9use YAML;
10 10
11my $parser = new Pod::POM meta => 1; 11my $parser = new Pod::POM meta => 1;
12
13my ($pom, $html);
14
15$pom = $parser->parse ("src/news-archive.pod")
16 or die $parser->error;
17$html = $pom->present ("PodHTML");
18$html =~ s/\[/</g;
19$html =~ s/\]/>/g;
20open FH, ">", "src/news-archive.html";
21print FH "News Archive\n\n";
22print FH $html;
23close FH;
24
25$pom = $parser->parse ("src/news.pod")
26 or die $parser->error;
27$html = $pom->present ("PodHTML");
28$html =~ s/\[/</g;
29$html =~ s/\]/>/g;
30open FH, ">", "html/news.html";
31print FH $html;
32close FH;
33
34%PodRSS::metadata = %{ $pom->metadata };
35$html = $pom->present ("PodRSS");
36$html =~ s/\[/</g;
37$html =~ s/\]/>/g;
38open FH, ">", "html/news.rss";
39print FH $html;
40close FH;
12 41
13# Static variables 42# Static variables
14my $static = YAML::LoadFile "variables.yml"; 43my $static = YAML::LoadFile "variables.yml";
15 44
16my @files = <src/*.html>; 45my @files = <src/*.html>;
77} 106}
78 107
79generate "src", "html", @files; 108generate "src", "html", @files;
80generate "monsters", "html\/monsters", @monsters; 109generate "monsters", "html\/monsters", @monsters;
81 110
82my $pom = $parser->parse ("src/news.pod")
83 or die $parser->error;
84my $html = $pom->present ("PodHTML");
85$html =~ s/\[/</g;
86$html =~ s/\]/>/g;
87open FH, ">", "html/news.html";
88print FH $html;
89close FH;
90
91%PodRSS::metadata = %{ $pom->metadata };
92$html = $pom->present ("PodRSS");
93$html =~ s/\[/</g;
94$html =~ s/\]/>/g;
95open FH, ">", "html/news.rss";
96print FH $html;
97close FH;
98
99
100$pom = $parser->parse ("src/news-archive.pod")
101 or die $parser->error;
102$html = $pom->present ("PodHTML");
103$html =~ s/\[/</g;
104$html =~ s/\]/>/g;
105open FH, ">", "html/news-archive.html";
106print FH $html;
107close FH;
108
109 111
110package PodHTML; 112package PodHTML;
111 113
112use strict; 114use strict;
113use warnings; 115use warnings;
114use utf8; 116use utf8;
115 117
116my $rcsid = '$Id: generate,v 1.13 2007/09/16 12:13:23 pippijn Exp $'; 118my $rcsid = '$Id: generate,v 1.14 2007/09/16 12:25:35 pippijn Exp $';
117 119
118use base "Pod::POM::View"; 120use base "Pod::POM::View";
119 121
120our $subdir; 122our $subdir;
121our $dir; 123our $dir;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines