markup: spreadsheet remove dupes
This commit is contained in:
@ -26,7 +26,9 @@ def write_spreadsheet(matches, workdir, file_base):
|
||||
# header row
|
||||
ws.append(['Season', 'Gender', 'Name', 'Style Number', 'Color'])
|
||||
|
||||
# TODO: uniquify and sort matches
|
||||
# TODO: sort matches
|
||||
|
||||
seen = {}
|
||||
|
||||
for m in matches:
|
||||
# in the case of kids,
|
||||
@ -38,7 +40,9 @@ def write_spreadsheet(matches, workdir, file_base):
|
||||
colors = m['color'].split('\n')
|
||||
|
||||
for s, g, n, m, c in zip_longest(seasons, genders, names, materials, colors, fillvalue=''):
|
||||
ws.append([format_season(s), g, n, m, c])
|
||||
if not m in seen:
|
||||
ws.append([format_season(s), g, n, m, c])
|
||||
seen[m] = True
|
||||
|
||||
# save
|
||||
ensure_dir(workdir)
|
||||
|
||||
Reference in New Issue
Block a user