diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2008-10-01 15:22:45 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2008-10-01 15:22:45 +0200 |
commit | 83afeae4d726fe1a9337623e4aafcb2c8eff1432 (patch) | |
tree | 183bf6e8373af354dc8f84235a2c11fe42070067 | |
parent | 8a97ddf397d9a2678963d39f7ede3df8ae796ce1 (diff) | |
download | trivium-83afeae4d726fe1a9337623e4aafcb2c8eff1432.tar.gz trivium-83afeae4d726fe1a9337623e4aafcb2c8eff1432.tar.xz trivium-83afeae4d726fe1a9337623e4aafcb2c8eff1432.zip |
Fix Atom updated/published semantics
-rw-r--r-- | template/atom.ht | 4 | ||||
-rw-r--r-- | 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| <link rel="alternate" type="text/html" href="http://chneukirchen.org/trivium/${entry[:id]}" /> <id>tag:chneukirchen.org,2008:trivium-${entry[:id]}</id> - <updated>${entry[:date].iso8601}</updated> - <published>${self[:time].iso8601}</published> + <updated>${entry[:updated].iso8601}</updated> + <published>${entry[:date].iso8601}</published> <content type="html"> ${format(entry)} </content> 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 |