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

Comparing deliantra/www/generate (file contents):
Revision 1.23 by root, Sun Apr 5 21:04:58 2009 UTC vs.
Revision 1.24 by root, Mon Mar 22 20:36:18 2010 UTC

1#!/opt/perl/bin/perl 1#!/opt/perl/bin/perl
2 2
3use strict; 3use common::sense;
4use warnings;
5use utf8;
6 4
7use Pod::POM; 5use Pod::POM;
8use Template; 6use Template;
9use YAML; 7use YAML;
10 8
15$pom = $parser->parse ("src/news.pod") 13$pom = $parser->parse ("src/news.pod")
16 or die $parser->error; 14 or die $parser->error;
17$html = $pom->present ("PodHTML"); 15$html = $pom->present ("PodHTML");
18$html =~ s/\[/</g; 16$html =~ s/\[/</g;
19$html =~ s/\]/>/g; 17$html =~ s/\]/>/g;
20open FH, ">", "src/news.html"; 18open FH, ">", "src/news.html.inc" or die "src/news.html.inc: $!";
21print FH "News\n\n<h1>News</h1>";
22print FH $html; 19print FH $html;
23close FH; 20close FH;
24 21
25%PodRSS::metadata = %{ $pom->metadata }; 22%PodRSS::metadata = %{ $pom->metadata };
26$html = $pom->present ("PodRSS"); 23$html = $pom->present ("PodRSS");
27open FH, ">", "html/news.rss"; 24open FH, ">", "html/news.rss" or die "html/news.rss: $!";
28print FH $html; 25print FH $html;
29close FH; 26close FH;
27
28system "rsync -avP src/. html/. --del --delete-excluded --exclude CVS";
29
30exit;
30 31
31# Static variables 32# Static variables
32my $static = YAML::LoadFile "variables.yml"; 33my $static = YAML::LoadFile "variables.yml";
33 34
34my @files = <src/*.html>; 35my @files = <src/*.html>;
115 116
116use strict; 117use strict;
117use warnings; 118use warnings;
118use utf8; 119use utf8;
119 120
120my $rcsid = '$Id: generate,v 1.23 2009/04/05 21:04:58 root Exp $'; 121my $rcsid = '$Id: generate,v 1.24 2010/03/22 20:36:18 root Exp $';
121 122
122use base "Pod::POM::View"; 123use base "Pod::POM::View";
123 124
124our $subdir; 125our $subdir;
125our $dir; 126our $dir;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines