X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom-plugins.git;a=blobdiff_plain;f=general%2Fatomfeed;h=c8d36c1da4e3bca8020187131ca09f5196902836;hp=e432ac8899a57abb65e192e6d9eea945e36f352c;hb=HEAD;hpb=a7001621a86286f74e304c2db2e5748471ed3f38 diff --git a/general/atomfeed b/general/atomfeed index e432ac8..c8d36c1 100644 --- a/general/atomfeed +++ b/general/atomfeed @@ -4,8 +4,8 @@ # UTC and fixes for 0.3: Frank Hecker # Enclosures support: Dave Slusher and Keith Irwin # Upgrade to Atom 1.0 spec: Sam Pearson -# Replace $feed_url with $path_info_full: Gavin Carr -# Version: 2007-12-17 +# Removed static $feed_url, added georss support: Gavin Carr +# Version: 2007-12-31 # Docs: Included below: type "perldoc atomfeed", or scroll down # Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/ @@ -97,11 +97,11 @@ $zerozero = '00'; $id_domain or ($id_domain) = $blosxom::url =~ m#http://(?:www\.)?([^\/]+)#; $utc_date = ''; -$feed_utc_date = ''; use vars qw/$feed_utc_date/; $category; $links; $summary; +$georss; # ----- plugin subroutines ----- @@ -159,6 +159,8 @@ sub head { ($blog_title_type, $blog_title) = _parse_markup($blosxom::blog_title); ($blog_description_type, $blog_description) = _parse_markup($blosxom::blog_description); + $feed_utc_date = ''; + 1; } @@ -169,10 +171,17 @@ sub story { use File::stat; # set up : + $category = ''; if ( $path ) { $category = ""; } + # GeoRSS support + $georss = ''; + if ($blosxom::plugins{geo} && $geo::latitude && $geo::longitude) { + $georss = qq($geo::latitude $geo::longitude); + } + # : derive from %blosxom::files my @published_utc = gmtime($blosxom::files{"$blosxom::datadir$path/$filename.$blosxom::file_extension"}); $published_utc_date = sprintf("%4d-%02d-%02dT%02d:%02d:00Z", @@ -259,7 +268,7 @@ sub story { # Parse the post body: ($body_type, $body) = _parse_markup($$body_ref); - 1; + return 1; } sub foot { @@ -365,7 +374,16 @@ sub _load_templates { my $path_info_full = $blosxom::path_info_full || "$blosxom::path_info/index.atom"; $blosxom::template{'atom'}{'head'} =<\$atomfeed::css_url - + \$atomfeed::blog_title \$atomfeed::blog_description @@ -385,7 +403,7 @@ HEAD $atomfeed::title $atomfeed::published_utc_date $atomfeed::updated_utc_date - $atomfeed::category + $atomfeed::category$atomfeed::georss $atomfeed::author $atomfeed::author_uri$atomfeed::author_email