Some stuff goes here, probably.
<ttip:winlike:This text has an associated tooltip.>This tooltip will only show up if you mouse over the relevant text.</ttip>
Portrait | Stats | |||||
---|---|---|---|---|---|---|
PORTRAIT UNAVAILABLE | Pilot | Alias | Sex | Race | Power | |
N/A | N/A | N/A | N/A | N/A | ||
Biography | Agility | |||||
BIO UNAVAILABLE | N/A | |||||
Endurance | ||||||
N/A | ||||||
Bio Author | Color 1 | Color 2 | Color 3 | Focus | ||
Diversions Entertainment | N/A | N/A | N/A | N/A |
def generate_table(data=None): if data is None: data = {} if "portrait" not in data: data["portrait"] = "PORTRAIT UNAVAILABLE" if "biography" not in data: data["biography"] = "BIO UNAVAILABLE" if "bio_author" not in data: data["bio_author"] = "Diversions Entertainment" for datatype in ("pilot", "alias", "sex", "race", "color1", "color2", "color3", "power", "agility", "endurance", "focus"): if datatype not in data: data[datatype] = "N/A" result = ["|< 100% 271px >|\n^ Portrait ^^ Stats ^^^^^\n"] a = result.append a("| {portrait}\t|^ Pilot\t^ Alias\t^ Sex\t^ Race\t^ Power\t|\n") a("| :::\t|| {pilot}\t| {alias}\t| {sex}\t| {race}\t| {power}\t|\n") a("| :::\t|^ Biography\t|||^ Agility\t|\n") a("| :::\t|| {biography}\t|||| {agility}\t|\n") a("| :::\t|| :::\t|||^ Endurance\t|\n") a("| :::\t|| :::\t|||| {endurance}\t|\n") a("| :::\t|^ Bio Author\t^ Color 1\t^ Color 2\t^ Color 3\t^ Focus\t|\n") a("| :::\t|| {bio_author}\t| {color1}\t| {color2}\t| {color3}") a("\t| {focus}\t|") return "".join(result).format(**data)