Make Planet uses the </published> tag over the </updated> tag

Alexandre Vassalotti alexandre at peadrop.com
Mon Jul 9 02:58:20 EST 2007


Hi,

I would like to apologize if you got this twice. I am resending this
since I believe my first email got mangled:

     http://lists.planetplanet.org/archives/devel/2007-July/001606.html

This patch fixes a minor annoyance for people using Atom for their
blog feed (i.e., me and all Blogger users). The problem is whenever
someone edit a post,  the </updated> changes and make the edited post
appear again on the Planets the blog is aggregated on. My simple fix
is to prioritize the </published> tag over the </updated> tag.

Cheers,
-- Alexandre

--- planet/__init__.py  2006-07-26 23:53:24 +0000
+++ planet/__init__.py  2007-07-07 00:05:49 +0000
@@ -924,7 +924,7 @@
           added in previous updates and don't creep into the next one.
           """

-        for other_key in ("updated", "modified", "published", "issued", 
"created"):
+        for other_key in ("published", "updated", "modified", "issued", 
"created"):
               if self.has_key(other_key):
                   date = self.get_as_date(other_key)
                   break


More information about the devel mailing list