From c381a4c129eb059c8e77591263222f583d9b2387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 17 Mar 2023 11:54:55 +0100 Subject: [PATCH] compress.py: make executable and decompress argument from command line --- compress.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 compress.py diff --git a/compress.py b/compress.py old mode 100644 new mode 100755 index 92144dc..4d7d5cb --- a/compress.py +++ b/compress.py @@ -1,8 +1,11 @@ +#! /bin/python3 import json +import sys from enum import Enum from typing import List, Optional import more_itertools from variants import variant_id, variant_name +from termcolor import colored BASE62 = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -204,9 +207,6 @@ def link(game_json: dict) -> str: return "https://hanab.live/replay-json/{}".format(compressed) if __name__ == "__main__": - deck_str = "15shareutrkcydvpxxudafpwcpmnkiuijnbhfmowbfaqggqklvsl" - deck_str = "15mfqsfrjfeixvhkhtaplakrcpnxlwdyqnwsmovdagkgpiuubcub" - deck_str = "15utfaladkwvgrsdwfpqrkouvxiaismnujcxpmgpqckyfelnhhbb" - deck_str = "15vxsmoiybhkgamdagwcsbeuqpwdarfhukfvifnutxjcknrqppll" - deck = decompress_deck(deck_str) - print(deck) + for arg in sys.argv[1:]: + deck = decompress_deck(arg) + print(deck)