Fixed extraneous <updated>...</updated> tags for feed date/time in static rendering
[matthijs/upstream/blosxom-plugins.git] / general / rss10
1 # Blosxom Plugin: rss10
2 # Author(s): Rael Dornfest <rael@oreilly.com> 
3 # Version: 2.0b4
4 # Documentation: See the bottom of this file or type: perldoc rss10
5
6 package rss10;
7
8 # --- Configurable variables -----
9
10 # What is your full name?
11 $creator = 'John Jacob Jingleheimer Schmidt';
12
13 # What is your email address?
14 $email = 'jjjs@example';
15
16 # What is your timezone's offset from GMT?
17 $tz_offset = "-08:00"; #PST
18
19 # What placeholder in your flavour tempalte should I replace with <items />?
20 my $template_placeholder = "{{{items}}}";
21
22 # What is your TrackBack implementation's URL (if any)?
23 #$trackback_url = "$blosxom::url/tb.cgi";
24
25 # --- Plug-in package variables -----
26
27 $items;
28 $body;
29 $trackback_ping;
30
31 $generatorAgent = "http://blosxom.sourceforge.net/?v=$blosxom::version";
32
33 $T = 'T';
34 $colon = ":";
35
36 # --------------------------------
37
38 use FileHandle;
39
40 my $fh = new FileHandle;
41
42 sub start {
43   1;
44 }
45
46 sub head {
47   $items = '';
48 }
49
50 sub story {
51   my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
52
53   $body = $$body_ref;
54
55   $trackback_ping = $trackback_url ? qq{<trackback:ping rdf:resource="$trackback_url$path/$filename" />} : '';
56
57   $items .= qq{        <rdf:li rdf:resource="$blosxom::url$path/$filename.html" />\n};
58
59   1;
60 }
61
62 sub foot {
63   my($pkg, $currentdir, $foot_ref) = @_;
64
65   $items = <<"ITEMS";
66     <items>
67       <rdf:Seq>
68 $items
69       </rdf:Seq>
70     </items>
71 ITEMS
72
73   $blosxom::output =~ s/$template_placeholder/$items/m;
74
75   return 1;
76 }
77
78 1;
79
80 __END__
81
82 =head1 NAME
83
84 Blosxom Plug-in: rss10
85
86 =head1 SYNOPSIS
87
88 Purpose: Provides the extra bit of programming needed to produce a valid
89 RSS 1.0 [http://www.purl.org/rss/1.0/] feed for syndication.  Works
90 in concert with the associated {head,story,foot,content_type,date}.rss10 
91 flavour files.
92
93 =head1 VERSION
94
95 2.0b1
96
97 Version number coincides with the version of Blosxom with which the 
98 current version was first bundled.
99
100 =head1 AUTHOR
101
102 Rael Dornfest  <rael@oreilly.com>, http://www.raelity.org/
103
104 This plugin is now maintained by the Blosxom Sourceforge Team,
105 <blosxom-devel@lists.sourceforge.net>.
106
107 =head1 SEE ALSO
108
109 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
110
111 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
112
113 =head1 BUGS
114
115 None known; please send bug reports and feedback to the Blosxom
116 development mailing list <blosxom-devel@lists.sourceforge.net>.
117
118 =head1 LICENSE
119
120 Blosxom and this Blosxom Plug-in
121 Copyright 2003, Rael Dornfest 
122
123 Permission is hereby granted, free of charge, to any person obtaining a
124 copy of this software and associated documentation files (the "Software"),
125 to deal in the Software without restriction, including without limitation
126 the rights to use, copy, modify, merge, publish, distribute, sublicense,
127 and/or sell copies of the Software, and to permit persons to whom the
128 Software is furnished to do so, subject to the following conditions:
129
130 The above copyright notice and this permission notice shall be included
131 in all copies or substantial portions of the Software.
132
133 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
134 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
135 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
136 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
137 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
138 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
139 OTHER DEALINGS IN THE SOFTWARE.