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

Comparing deliantra/www/generate (file contents):
Revision 1.5 by pippijn, Sun Sep 16 07:44:24 2007 UTC vs.
Revision 1.6 by pippijn, Sun Sep 16 07:55:13 2007 UTC

96 96
97use strict; 97use strict;
98use warnings; 98use warnings;
99use utf8; 99use utf8;
100 100
101my $rcsid = '$Id: generate,v 1.5 2007/09/16 07:44:24 pippijn Exp $'; 101my $rcsid = '$Id: generate,v 1.6 2007/09/16 07:55:13 pippijn Exp $';
102 102
103use base "Pod::POM::View"; 103use base "Pod::POM::View";
104 104
105our $subdir; 105our $subdir;
106our $dir; 106our $dir;
110 my ($self, $item) = @_; 110 my ($self, $item) = @_;
111 $item->content->present ($self) 111 $item->content->present ($self)
112} 112}
113 113
114sub view_head1 { 114sub view_head1 {
115 my ($self, $item) = @_;
116 $item->content->present ($self)
117}
118
119sub view_head2 {
115 my ($self, $item) = @_; 120 my ($self, $item) = @_;
116 "<p><em>", $item->title, " ", $item->content, "</em></p>" 121 "<p><em>", $item->title, " ", $item->content, "</em></p>"
117} 122}
118 123
119=head1 AUTHOR 124=head1 AUTHOR
125This library is free software, you can redistribute it and/or modify 130This library is free software, you can redistribute it and/or modify
126it under the terms of the GNU General Public License. 131it under the terms of the GNU General Public License.
127 132
128=cut 133=cut
129 134
1301 1351;
136
137
138package PodRSS;
139
140use strict;
141use warnings;
142use utf8;
143
144use base "Pod::POM::View";
145
146our %metadata;
147
148sub view_pod {
149 my ($self, $item) = @_;
150 "<?xml version='1.0' encoding='utf-8'?>\n",
151 "<rss version='2.0'>\n",
152 $item->content->present ($self),
153 "</rss>\n"
154}
155
156sub view_head1 {
157 my ($self, $item) = @_;
158 my $title = $item->title->present ($self);
159 " <channel>\n",
160 " <link>$metadata{link}</link>\n",
161 " <language>$metadata{language}</language>\n",
162 " <title>$title</title>\n",
163 $item->content->present ($self),
164 " </channel>\n"
165}
166
167sub view_head2 {
168 my ($self, $item) = @_;
169 my $title = $item->title->present ($self);
170 " <item>\n",
171 " <title>$title</title>\n",
172 $item->content->present ($self),
173 " </item>\n"
174}
175
176sub view_textblock {
177 my ($self, $item) = @_;
178 " <description><![CDATA[$item]]></description>\n"
179}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines