diff Feed.py @ 31:5bb57caa8f66

display a feed's entries sorted by their update date
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 30 Apr 2010 06:01:54 +0200
parents 5fda8bd94fa8
children aaec263f07ca
line wrap: on
line diff
--- a/Feed.py	Thu Apr 29 16:49:45 2010 +0200
+++ b/Feed.py	Fri Apr 30 06:01:54 2010 +0200
@@ -1,3 +1,5 @@
+
+import FeedEntry
 
 class Feed(object):
     @staticmethod
@@ -13,3 +15,8 @@
 
     def userPresentableString(self):
         return self.title
+    
+    def entriesSortedByUpdateDate(self):
+        sortedEntries = list(self.entries)
+        sortedEntries.sort(FeedEntry.compareByUpdateDate)
+        return sortedEntries
\ No newline at end of file