Sort ComicFury comics ignoring case.

This commit is contained in:
Tobias Gruetzmacher 2016-03-31 23:26:56 +02:00
parent cfac0f40f1
commit a7b6599cd4

View file

@ -184,13 +184,18 @@ def find_dups(name):
return None return None
def first_lower(x):
return x[0].lower()
def print_results(args): def print_results(args):
"""Print all comics that have at least the given number of minimum """Print all comics that have at least the given number of minimum
comic strips.""" comic strips."""
min_comics, filename = args min_comics, filename = args
min_comics = int(min_comics) min_comics = int(min_comics)
with codecs.open(filename, 'a', 'utf-8') as fp: 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 url, num, active, lang = entry
if name in exclude_comics: if name in exclude_comics:
fp.write(u"# %s is excluded\n" % name) fp.write(u"# %s is excluded\n" % name)