From a7b6599cd4488479389fa8cb92afcd89c389f2d0 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Thu, 31 Mar 2016 23:26:56 +0200 Subject: [PATCH] Sort ComicFury comics ignoring case. --- scripts/comicfury.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/comicfury.py b/scripts/comicfury.py index 04f576661..66762871e 100755 --- a/scripts/comicfury.py +++ b/scripts/comicfury.py @@ -184,13 +184,18 @@ def find_dups(name): return None +def first_lower(x): + return x[0].lower() + + def print_results(args): """Print all comics that have at least the given number of minimum comic strips.""" min_comics, filename = args min_comics = int(min_comics) with codecs.open(filename, 'a', 'utf-8') as fp: - for name, entry in sorted(load_result(json_file).items()): + data = load_result(json_file) + for name, entry in sorted(data.items(), key=first_lower): url, num, active, lang = entry if name in exclude_comics: fp.write(u"# %s is excluded\n" % name)