rename columns

This commit is contained in:
Maximilian Keßler 2023-11-10 12:03:01 +01:00
parent 87cbc700ee
commit 220f210f75
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -108,12 +108,11 @@ def sort_players_by_num_games(games_dict):
nums[col] = num + 1
return sorted(player_cols, key = lambda col: -nums[col])
if __name__ == "__main__":
games = collect_player_games()
analysis = analyze_games(games)
streaks = {}
fieldnames = ['Replay Number', 'Seed Name', 'Player #', 'Result', 'BDR']
fieldnames = ['Game ID', 'Seed', 'Player #', 'Result', 'BDR']
fieldnames += sort_players_by_num_games(games)
fieldnames += ['Other']
@ -125,8 +124,8 @@ if __name__ == "__main__":
for game_id, entry in sorted(games.items()):
bdrs, termination = analysis[game_id]
row = {
'Replay Number': "<a href='https://hanab.live/replay/{}'>{}</a>".format(entry.game_id, entry.game_id),
'Seed Name': "<a href='https://hanab.live/seed/{}'>{}</a>".format(entry.seed, entry.seed),
'Game ID': "<a href='https://hanab.live/replay/{}'>{}</a>".format(entry.game_id, entry.game_id),
'Seed': "<a href='https://hanab.live/seed/{}'>{}</a>".format(entry.seed, entry.seed),
'Player #': entry.num_players,
'Result': 'Win' if entry.won else termination,
'BDR': len(bdrs),