try:
cPickle.dump(blog, open(os.path.join('cache', name), 'w'))
except:
- sys.stderr.write('DEBUG: CacheHandler: Item could not be written to cache\n')
+# sys.stderr.write('DEBUG: CacheHandler: Item could not be written to cache\n')
+ pass
def getBlog(self, title, feed):
name = self.__create_name__(title, feed)
blog = cPickle.load(open(os.path.join('cache', name)))
except:
blog = None
- sys.stderr.write('DEBUG: CacheHandler: Could not read item from cache\n')
+# sys.stderr.write('DEBUG: CacheHandler: Could not read item from cache\n')
return blog
class CacheObject:
if self.parent:
output += '<h2>Feeds</h2>\n'
output += '<p>\n'
- for blog in self.parent.blogs:
+ blogscopy = self.parent.blogs + []
+ blogscopy.sort(self.__blog_sort__)
+ for blog in blogscopy:
output += '<a href="%s">%s</a> (<a href="%s">feed</a>)<br />\n' % (blog.blogURL, blog.blogTitle, blog.feedURL)
output += '</p>\n'
output += '</div>\n'
output += '</body>\n'
output += '</html>'
return output
+
+ def __blog_sort__(self, blog1, blog2):
+ name1, name2 = blog1.blogTitle.split(' ')[-1], blog2.blogTitle.split(' ')[-1]
+ if name1 < name2: return -1
+ if name1 == name2: return 0
+ if name1 > name2: return 1
# read in by update-planet, to generate planet.html
# name url
#
-Davyd Madeley http://www.livejournal.com/users/davyd/data/rss
-Ian McKellar http://ian.mckellar.org/wp-rss2.php
-Grahame Bowland http://www.livejournal.com/users/grahame/data/rss
-Adam Wright http://www.livejournal.com/users/hipikat/data/rss
-Adrian Chadd http://blog.cacheboy.net/blogs/cacheboy/index.rdf
-Trent Lloyd http://www.livejournal.com/users/lathiat/data/rss
-Matt Johnson http://www.livejournal.com/users/mkj/data/rss
-David Basden http://www.livejournal.com/users/shigawire/data/rss
-Michael Deegan http://www.livejournal.com/users/leahcim/data/rss
-James Cox http://www.livejournal.com/users/coxymla/data/rss
-Mark Tearle http://www.livejournal.com/users/unfoldedreality/data/rss
-Tom Castiglione http://www.livejournal.com/users/zharradan/data/rss
-Elaine Walker http://ariaflame.blogspot.com/atom.xml
-Rod Swift http://www.livejournal.com/users/rodcub/data/rss
+Davyd Madeley http://www.livejournal.com/users/davyd/data/rss
+Ian McKellar http://ian.mckellar.org/wp-rss2.php
+Grahame Bowland http://www.livejournal.com/users/grahame/data/rss
+Adam Wright http://www.livejournal.com/users/hipikat/data/rss
+Adrian Chadd http://blog.cacheboy.net/blogs/cacheboy/index.rdf
+Trent Lloyd http://www.livejournal.com/users/lathiat/data/rss
+Matt Johnson http://www.livejournal.com/users/mkj/data/rss
+David Basden http://www.livejournal.com/users/shigawire/data/rss
+Michael Deegan http://www.livejournal.com/users/leahcim/data/rss
+James Cox http://www.livejournal.com/users/coxymla/data/rss
+Mark Tearle http://www.livejournal.com/users/unfoldedreality/data/rss
+Tom Castiglione http://www.livejournal.com/users/zharradan/data/rss
+Elaine Walker http://ariaflame.blogspot.com/atom.xml
+Chris Bobridge http://www.livejournal.com/users/maelkann/data/rss
+Aaron Alderman http://www.livejournal.com/users/palaceboy/data/rss
+Brad Wake http://www.livejournal.com/users/thebmw/data/rss
+Mikolaj Habryn http://mikolaj.tv/rss2.xml
+James Andrewartha http://www.advogato.com/person/trs80/rss.xml