From 83afeae4d726fe1a9337623e4aafcb2c8eff1432 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 1 Oct 2008 15:22:45 +0200 Subject: Fix Atom updated/published semantics --- template/atom.ht | 4 ++-- trivium.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/template/atom.ht b/template/atom.ht index af4e45c..a6f84a6 100644 --- a/template/atom.ht +++ b/template/atom.ht @@ -29,8 +29,8 @@ $ self[:entries].each { |entry| tag:chneukirchen.org,2008:trivium-${entry[:id]} - ${entry[:date].iso8601} - ${self[:time].iso8601} + ${entry[:updated].iso8601} + ${entry[:date].iso8601} ${format(entry)} diff --git a/trivium.rb b/trivium.rb index 2470a00..a3e740b 100644 --- a/trivium.rb +++ b/trivium.rb @@ -20,6 +20,7 @@ def parse(f) entry = {:body => body, :id => File.basename(f, ".entry"), :file => f} head.scan(/(\w+): *(.*)/) { entry[$1.downcase.to_sym] = $2 } entry[:date] = Time.parse(entry[:date]) if entry[:date] + entry[:updated] = entry[:updated] ? Time.parse(entry[:updated]) : entry[:date] entry[:title] = entry[:date].strftime("%d%b%Y").downcase if entry[:date] entry end -- cgit 1.4.1