diff --git a/main.py b/main.py index 40765eb..8c2103b 100644 --- a/main.py +++ b/main.py @@ -124,6 +124,7 @@ def parse_COMMANDS(data): def parse_SEED(data): + # This is a fake section injected by the file loader. It contains only the seed code is_BCCE = True if data.startswith("CE") else False # Normalize seed codes to BCEX format, removing spaces and replacing pipes with dots @@ -132,6 +133,11 @@ def parse_SEED(data): return {"is_bcce": is_BCCE, "seed": seed} +def parse_SECRET_ITEMS(data): + # I have no idea what this is lol, dump it to a list for now + return [line for line in data.split("\n") if not line.startswith("---")] + + def load(filename): # Load our file, tokenize by section header (starting with ====) with open(filename) as infile: @@ -163,7 +169,8 @@ if __name__ == "__main__": # and just continues to the next section if one doesn't exist. for k, v in sections.items(): try: - data[k] = globals()[f"parse_{k}"](v) + section_func = f"parse_{k.replace(' ', '_')}" + data[k] = globals()[section_func](v) except KeyError: continue