From 57790e76156d63ceefbbb3eea37cabcd2f7592c0 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 17 Mar 2020 19:16:11 +0100 Subject: [PATCH] Allow running just Patch.py --- Patch.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Patch.py b/Patch.py index 63102a3b..8c6fca58 100644 --- a/Patch.py +++ b/Patch.py @@ -63,3 +63,13 @@ def load_bytes(path: str): def write_lzma(data: bytes, path: str): with lzma.LZMAFile(path, 'wb') as f: f.write(data) + +if __name__ == "__main__": + ipv4 = Utils.get_public_ipv4() + import sys + + for rom in sys.argv: + if rom.endswith(".sfc"): + print(f"Creating patch for {rom}") + result = create_patch_file(rom, ipv4) + print(f"Created patch {result}")