Mercurial > hg > chronicle
changeset 80:5379f7e3f7de
Updated so that we have pubDate attributes for our RDF
author | Steve Kemp <steve@steve.org.uk> |
---|---|
date | Tue, 11 Dec 2007 00:43:29 +0000 |
parents | 9728676c3a85 |
children | 073dc15e70ac |
files | bin/chronicle themes/xml/index.xml.template themes/xml/month.xml.template themes/xml/tags.xml.template |
diffstat | 4 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/chronicle Mon Dec 10 23:52:29 2007 +0000 +++ b/bin/chronicle Tue Dec 11 00:43:29 2007 +0000 @@ -881,6 +881,7 @@ foreach my $file ( keys ( %data ) ) { my $blog = readBlogEntry( $file ); + push( @$tmp, $blog ) if (keys( %$blog ) ); } my @tmp2 = sort bywhen @$tmp; @@ -1430,6 +1431,19 @@ } # + # Make an entry date for the XML feed + # + if ( $date ) + { + my $time = str2time($date); + if ( $time ) + { + $entry{'pubdate'} = time2str("%a, %e %b %Y 00:00:00 GMT", $time ); + } + } + + + # # Store the entry. # $entry{'title'} = $title;
--- a/themes/xml/index.xml.template Mon Dec 10 23:52:29 2007 +0000 +++ b/themes/xml/index.xml.template Tue Dec 11 00:43:29 2007 +0000 @@ -3,12 +3,14 @@ <channel> <title>Blog Entries</title> <description>Blog Entries</description> + <link><!-- tmpl_var name='top' --></link> <!-- tmpl_loop name="entries" --> <item> <title><!-- tmpl_var name="title" escape='html' --></title> <link><!-- tmpl_var name='top' --><!-- tmpl_var name='link' --></link> <guid isPermaLink="true"><!-- tmpl_var name='top' --><!-- tmpl_var name='link' --></guid> + <pubDate><!-- tmpl_var name='pubdate' --></pubDate> <description><!-- tmpl_var name="body" escape='html' --></description> </item> <!-- /tmpl_loop -->
--- a/themes/xml/month.xml.template Mon Dec 10 23:52:29 2007 +0000 +++ b/themes/xml/month.xml.template Tue Dec 11 00:43:29 2007 +0000 @@ -3,12 +3,14 @@ <channel> <title>Entries from <!-- tmpl_var name='month_name' --> <!-- tmpl_var name='year' --></title> <description>Entries from <!-- tmpl_var name='month_name' --> <!-- tmpl_var name='year' --></description> + <link><!-- tmpl_var name='top' --></link> <!-- tmpl_loop name="entries" --> <item> <title><!-- tmpl_var name="title" escape='html' --></title> <link><!-- tmpl_var name='top' --><!-- tmpl_var name='link' --></link> <guid isPermaLink="true"><!-- tmpl_var name='top' --><!-- tmpl_var name='link' --></guid> + <pubDate><!-- tmpl_var name='pubdate' --></pubDate> <description><!-- tmpl_var name="body" escape='html' --></description> </item> <!-- /tmpl_loop -->
--- a/themes/xml/tags.xml.template Mon Dec 10 23:52:29 2007 +0000 +++ b/themes/xml/tags.xml.template Tue Dec 11 00:43:29 2007 +0000 @@ -3,12 +3,14 @@ <channel> <title>Entries tagged <!-- tmpl_var name='tagname' escape='html' --></title> <description>Entries tagged <!-- tmpl_var name='tagname' escape='html' --></description> + <link><!-- tmpl_var name='top' --></link> <!-- tmpl_loop name="entries" --> <item> <title><!-- tmpl_var name="title" escape='html' --></title> <link><!-- tmpl_var name='top' --><!-- tmpl_var name='link' --></link> <guid isPermaLink="true"><!-- tmpl_var name='top' --><!-- tmpl_var name='link' --></guid> + <pubDate><!-- tmpl_var name='pubdate' --></pubDate> <description><!-- tmpl_var name="body" escape='html' --></description> </item> <!-- /tmpl_loop -->