import flask medalDict = { "games-played-1" : { "name" : "Tourist", "text" : "Played {} games on this server", "color" : "white", "text-color" : "black" }, "games-played-2" : { "name" : "Enlisted", "text" : "Played {} games on this server", "color": "green", "text-color" : "white" }, "games-played-3" : { "name" : "Veteran", "text" : "Played {} games on this server", "color" : "yellow", "text-color" : "black" }, "rating-cur-1" : { "name" : "Slightly skilled", "text" : "Rated above 1500", "color" : "beige", "text-color" : "black" }, "rating-2k-1" : { "name" : "Contender", "text" : "Played {} games above 2000 rating", "color" : "coral", "text-color" : "black" }, "rating-2k-2" : { "name" : "Known Contender", "text" : "Played {} games above 2000 rating", "color" : "lightgreen", "text-color" : "black" }, "rating-3k-1" : { "name" : "Epic", "text" : "Played {} games above 3000 rating", "color" : "lightblue", "text-color" : "black" }, "rating-3k-2" : { "name" : "Legend", "text" : "Played {} games above 3000 rating", "color" : "orange", "text-color" : "black" }, "rating-3k-3" : { "name" : "All Along The Watchtower", "text" : "Played {} games above 3000 rating", "color" : "red", "text-color" : "black" }, } def medalGen(medal, formatInsert=None): '''Gen HTML for metal''' html = '\