diff options
author | cedricbonhomme <devnull@localhost> | 2010-07-05 12:27:54 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-07-05 12:27:54 +0200 |
commit | 4ac5825b32443c3408263f810f1678f9937894cc (patch) | |
tree | d120d218d7382cf30c3b2770ed53eb49b094a115 | |
parent | Release 1.5. (+ a minor bug fix.) (diff) | |
download | newspipe-4ac5825b32443c3408263f810f1678f9937894cc.tar.gz newspipe-4ac5825b32443c3408263f810f1678f9937894cc.tar.bz2 newspipe-4ac5825b32443c3408263f810f1678f9937894cc.zip |
Case-insensitive sorting.
-rwxr-xr-x | utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -283,8 +283,11 @@ def load_feed(): articles, feeds = {}, OrderedDict() if list_of_feeds != []: sha1_hash = hashlib.sha1() - print sorted(list_of_feeds) - for feed in sorted(list_of_feeds): + # Case-insensitive sorting + tupleList = [(x[3].upper(), x) for x in list_of_feeds] + tupleList.sort(key=operator.itemgetter(0)) + + for feed in [x[1] for x in tupleList]: list_of_articles = c.execute(\ "SELECT * FROM articles WHERE feed_link='" + \ feed[2] + "'").fetchall() |