1 # Blosxom Plugin: rss20
2 # Author(s): Gavin Carr <gavin@openfusion.com.au>
4 # Requires: storydate, lastmodified2
6 # Follows: storydate, lastmodified2
21 # --- Configuration variables -----
23 # What flavour string to you want to use for your feed?
27 # What email address should be used as the default author email?
28 $author_email = 'author@example.com';
30 # What email address should feed errors be reported to?
33 # What do your story permalinks look like?
34 # This must be single-quoted, to defer evaluation; blosxom namespace applies
35 $permalink = '$url$path/$fn.$default_flavour';
37 # What link should be used for trackbacks on a story?
38 # This must be single-quoted, to defer evaluation; blosxom namespace applies
40 # $trackback_link = '$url$path/$fn.writeback';
41 # $trackback_link = '$url$path/$fn.$feedback::trackback_flavour';
43 # Copyright statement; leave blank to omit.
46 # Generator that produced this feed
47 $generator_url = "http://blosxom.sourceforge.net/?v=$blosxom::version";
49 # --------------------------------
51 $error_email ||= $author_email;
59 # --- Private subroutines
62 $blosxom::template{$flavour}{'content_type'} = 'text/xml; charset=$blog_encoding';
64 $blosxom::template{$flavour}{'date'} = "\n";
66 $blosxom::template{$flavour}{'head'} = <<'HEAD';
67 <?xml version="1.0" encoding="$blog_encoding"?>
69 xmlns:dc="http://purl.org/dc/elements/1.1/"
70 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
71 xmlns:admin="http://webns.net/mvcb/"
72 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
73 xmlns:content="http://purl.org/rss/1.0/modules/content/">
76 <title>$blog_title</title>
78 <description>$blog_description</description>
79 <dc:date>$lastmodified2::latest_iso8601</dc:date>
80 <dc:language>$blog_language</dc:language>
81 <dc:creator>mailto:$rss20::author_email</dc:creator>
82 <dc:rights>$rss20::copyright</dc:rights>
83 <admin:generatorAgent rdf:resource="$rss20::generator_url" />
84 <admin:errorReportsTo rdf:resource="mailto:$rss20::error_email" />
85 <sy:updatePeriod>hourly</sy:updatePeriod>
86 <sy:updateFrequency>1</sy:updateFrequency>
87 <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
91 $blosxom::template{$flavour}{'story'} = <<STORY;
93 <title>\$title</title>
94 <link>$rss20::permalink</link>
95 <description>\$body</description>
96 <comments>$rss20::trackback_link</comments>
97 <guid isPermaLink="true">$rss20::permalink</guid>
98 <dc:date>\$storydate::story_iso8601</dc:date>
102 $blosxom::template{$flavour}{'foot'} = <<'FOOT';
115 rss20 - blosxom plugin to generate an RSS 2.0 feed of your blog
119 rss20 is a blosxom plugin to generate an RSS 2.0 feed of your blog. It
120 is self-contained, including the required flavours, and has a bunch of
121 configuration variables to allow for configuration.
125 The following package variables can be configured:
131 Flavour string to use for your feed (typically 'rss' or 'rss20').
135 Default author email address for posts.
139 Email address to use to report errors with the feed (defaults to
144 Story permalink. Default is '$url$path/$fn.$default_flavour'.
145 Note that this value should probably be single quoted to defer
146 variable evaluation until rendering time.
148 =item $trackback_link
150 Story trackback or comment link. Default is ''. Useful if you
151 are using a comments plugin like C<writeback> or C<feedback>,
152 and the format you want will be plugin-dependant.
154 Like $permalink, this value should be single quoted to defer
155 variable evaluation till rendering time.
159 Default copyright clause for posts, if any.
165 rss20 should be loaded relatively late, since you'll typically want
166 plugins that manipulate your story content to have run already. It
167 also should be run after the 'story' or 'prefs' plugins if you want
168 to use those to customise your configuration variables.
173 Blosxom: http://blosxom.sourceforge.net/
175 rss20 is based on the 'atomfeed' and 'rss10' plugins, by Rael
176 Dornfest and contributors.
181 Please report bugs either directly to the author or to the blosxom
182 development mailing list: <blosxom-devel@lists.sourceforge.net>.
187 Gavin Carr <gavin@openfusion.com.au>, http://www.openfusion.net/
192 Copyright 2007 Gavin Carr.
194 This plugin is licensed under the same terms as blosxom itself i.e.
196 Permission is hereby granted, free of charge, to any person obtaining a
197 copy of this software and associated documentation files (the "Software"),
198 to deal in the Software without restriction, including without limitation
199 the rights to use, copy, modify, merge, publish, distribute, sublicense,
200 and/or sell copies of the Software, and to permit persons to whom the
201 Software is furnished to do so, subject to the following conditions:
203 The above copyright notice and this permission notice shall be included
204 in all copies or substantial portions of the Software.
206 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
207 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
208 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
209 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
210 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
211 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
212 OTHER DEALINGS IN THE SOFTWARE.