[Patch] Sort subscriptions case insensitive
Mikael Nilsson
mikael at nilsson.name
Wed Sep 23 09:43:57 EST 2009
For reference, I'm posting a patch to sort the subscriptions list case
insensitively. I find it much better for my use case.
Oh, BTW, the site I'm working on is http://live.piratpartiet.se - a blog
aggregator for the Swedish Pirate party :-)
--- venus/planet/shell/tmpl.py.old 2009-09-23 01:33:52.000000000 +0200
+++ venus/planet/shell/tmpl.py 2009-09-23 01:35:41.000000000 +0200
@@ -201,7 +201,7 @@
for feed in data.feed.get('sources',[]):
source = tmpl_mapper(feed, Base)
sources.append([source.get('name'), source])
- sources.sort()
+ sources.sort(lambda x,y: cmp(x[0].upper(), y[0].upper()))
output['Channels'] = [source for name,source in sources]
for entry in data.entries:
output['Items'].append(tmpl_mapper(entry, Items))
/Mikael
More information about the devel
mailing list