X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom-plugins.git;a=blobdiff_plain;f=gavinc%2Frss20;fp=gavinc%2Frss20;h=38a2687f559b148ac2bd3ee44b9dd94b4ec4e335;hp=1f5e5fb3f000c3d3569c71c24bc117f7124c7369;hb=10644594d8c7c02df913ff58b06b47a350965f9b;hpb=70240bdaf07ceec70cec80d56fa31cfca0b651ef diff --git a/gavinc/rss20 b/gavinc/rss20 index 1f5e5fb..38a2687 100644 --- a/gavinc/rss20 +++ b/gavinc/rss20 @@ -1,8 +1,8 @@ # Blosxom Plugin: rss20 # Author(s): Gavin Carr -# Version: 0.002000 +# Version: 0.003000 # Requires: storydate -# Suggests: absolute, storytags +# Suggests: absolute, storytags, geo # Follows: storydate package rss20; @@ -19,6 +19,7 @@ use vars qw( $copyright $generator $category_list + $georss ); # --- Configuration variables ----- @@ -112,6 +113,14 @@ sub story { $category_list .= qq($_\n) . ' ' x $item_indent; } } + + $georss = ''; + if ($blosxom::plugins{geo} && $geo::latitude && $geo::longitude) { + $georss = qq($geo::latitude $geo::longitude\n) . + ' ' x $item_indent; + } + + return 1; } # --- Private subroutines @@ -138,6 +147,14 @@ sub _load_templates { @@ -200,8 +217,17 @@ STORY ' ' x $item_indent . qq($rss20::trackback_link\n); } - $blosxom::template{$flavour}{'story'} .= <\$body + $blosxom::template{$flavour}{'story'} .= + ' ' x $item_indent . + '$rss20::category_list'; + + # GeoRSS support + if ($blosxom::plugins{geo}) { + $blosxom::template{$flavour}{'story'} .= '$rss20::georss'; + } + + $blosxom::template{$flavour}{'story'} .= <<'STORY'; +$body STORY @@ -230,6 +256,10 @@ rss20 is a blosxom plugin to generate an RSS 2.0 feed of your blog. It is self-contained, including the required flavours, and has a bunch of configuration variables to allow for configuration. +If you're using the L plugin, rss20 will also add georss:point +entries for any items with latitude and longitude metadata set (see +L). + =head2 CONFIGURATION The following package variables can be configured: @@ -277,9 +307,15 @@ plugins that manipulate your story content to have run already. It also should be run after the 'story' or 'prefs' plugins if you want to use those to customise your configuration variables. +Requires the L plugin for setting up story dates in the +right formats, and recommends the L plugin for absolutising +URLs. + =head1 SEE ALSO +L, L, L + Blosxom: http://blosxom.sourceforge.net/ rss20 is based on the 'atomfeed' and 'rss10' plugins, by Rael