fix contributor list sorting
Two things were off: 1. sorting should be case-insensitive, in both places 2. multiple entries can be added just before the same line
This commit is contained in:
@@ -41,13 +41,13 @@ feature.
|
||||
|
||||
* Albireo <kappa7194@hotmail.it>
|
||||
* arrai <array.of.intellect@gmail.com>
|
||||
* Kyle Brantley <kyle@averageurl.com>
|
||||
* asmodai <asmodai@in-nomine.org>
|
||||
* but2002 <barryt_9@hotmail.com>
|
||||
* Mark Barnes <mark.e.barnes@gmail.com>
|
||||
* Kyle Brantley <kyle@averageurl.com>
|
||||
* but2002 <barryt_9@hotmail.com>
|
||||
* Eric Carr <eric@carr.no>
|
||||
* Carter Charbonneau <zcarterc@gmail.com>
|
||||
* cbarber <CraigBarber@taryx.com>
|
||||
* Carter Charbonneau <zcarterc@gmail.com>
|
||||
* Alex Cline <cline@vivisimo.com>
|
||||
* Andrew Clunis <andrew@orospakr.ca>
|
||||
* CounterPillow <spam@tes-cheese.ch>
|
||||
@@ -56,8 +56,8 @@ feature.
|
||||
* Ryan Finnie <ryan@feh.colobox.com>
|
||||
* Stephen Fluin <stephen@mistuph.com>
|
||||
* Pierre Guinoiseau <pierre@guinoiseau.eu>
|
||||
* Benjamin Herr <ben@0x539.de>
|
||||
* Lucas Hereld <duckman@piratehook.com>
|
||||
* Benjamin Herr <ben@0x539.de>
|
||||
* Ryan Hitchman <hitchmanr@gmail.com>
|
||||
* Jenny <jennytoo@gmail.com>
|
||||
* Michael Jensen <emjay1988@gmail.com>
|
||||
@@ -68,16 +68,16 @@ feature.
|
||||
* Maciej Malecki <maciej.malecki@hotmail.com>
|
||||
* Ryan McCue <ryanmccue@cubegames.net>
|
||||
* Zach McCullough <nosrepa@gmail.com>
|
||||
* Morlok8k <otis.spankmeyer@gmail.com>
|
||||
* Mike <mike@snowcrash.ca>
|
||||
* Ryan Rector <rmrector@gmail.com>
|
||||
* Morlok8k <otis.spankmeyer@gmail.com>
|
||||
* Richard Pastrick <rpastric@contre.us>
|
||||
* Ryan Rector <rmrector@gmail.com>
|
||||
* Jason Scheirer <jason.scheirer@gmail.com>
|
||||
* Gregory Short <gshort2@gmail.com>
|
||||
* Sam Steele <sam@sigbox.c99.org>
|
||||
* stoneLeaf <owi.stoneleaf@gmail.com>
|
||||
* timwolla <timwolla@mail.develfusion.com>
|
||||
* TJ09 <TJ09@localhost>
|
||||
* Jeffrey Warren <warren@mit.edu>
|
||||
* untergrundbiber <untergrundbiber@github>
|
||||
* Philippe Villiers <kissifrot@gmail.com>
|
||||
* Jeffrey Warren <warren@mit.edu>
|
||||
|
||||
@@ -82,7 +82,7 @@ def main():
|
||||
for contributor in new_contributors:
|
||||
print format_contributor(contributor)
|
||||
|
||||
# merge with contributor list
|
||||
# merge with alphabetical (by last part of name) contributor list
|
||||
i = 0
|
||||
short_term_found = False
|
||||
for line in fileinput.input("CONTRIBUTORS.rst", inplace=1):
|
||||
@@ -94,10 +94,16 @@ def main():
|
||||
if i >= len(new_contributors) or "@" not in line:
|
||||
print line,
|
||||
else:
|
||||
listed_name = line.split()[-2].lower()
|
||||
contributor = new_contributors[i]
|
||||
if line.split()[-2] > contributor["name"][-1]:
|
||||
# insert all new contributors that fit here
|
||||
while listed_name > contributor["name"][-1].lower():
|
||||
print format_contributor(contributor)
|
||||
i += 1
|
||||
if i < len(new_contributors):
|
||||
contributor = new_contributors[i]
|
||||
else:
|
||||
break
|
||||
print line,
|
||||
# append remaining contributors
|
||||
with open("CONTRIBUTORS.rst", "a") as contrib_file:
|
||||
|
||||
Reference in New Issue
Block a user