From 49d5e1260fa5ef7583d333251afc9d88ceec2565 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Sun, 30 Jun 2024 21:51:44 -0700 Subject: [PATCH] Add seed and version info to output - Add seed - Normalize seed code to BCEX format - Add is_bcce - Bump version to 0.2 --- main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index be357d5..40765eb 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -__version__ = "0.1" +__version__ = "0.2" __author__ = "Trysdyn Black" import json @@ -123,6 +123,15 @@ def parse_COMMANDS(data): return commands +def parse_SEED(data): + is_BCCE = True if data.startswith("CE") else False + + # Normalize seed codes to BCEX format, removing spaces and replacing pipes with dots + seed = data.replace("|", ".").replace(" ", "") + + return {"is_bcce": is_BCCE, "seed": seed} + + def load(filename): # Load our file, tokenize by section header (starting with ====) with open(filename) as infile: