compress.py: make executable and decompress argument from command line
This commit is contained in:
parent
0756bba205
commit
c381a4c129
1 changed files with 6 additions and 6 deletions
10
compress.py
Normal file → Executable file
10
compress.py
Normal file → Executable file
|
@ -1,8 +1,11 @@
|
||||||
|
#! /bin/python3
|
||||||
import json
|
import json
|
||||||
|
import sys
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
import more_itertools
|
import more_itertools
|
||||||
from variants import variant_id, variant_name
|
from variants import variant_id, variant_name
|
||||||
|
from termcolor import colored
|
||||||
|
|
||||||
|
|
||||||
BASE62 = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
BASE62 = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
@ -204,9 +207,6 @@ def link(game_json: dict) -> str:
|
||||||
return "https://hanab.live/replay-json/{}".format(compressed)
|
return "https://hanab.live/replay-json/{}".format(compressed)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
deck_str = "15shareutrkcydvpxxudafpwcpmnkiuijnbhfmowbfaqggqklvsl"
|
for arg in sys.argv[1:]:
|
||||||
deck_str = "15mfqsfrjfeixvhkhtaplakrcpnxlwdyqnwsmovdagkgpiuubcub"
|
deck = decompress_deck(arg)
|
||||||
deck_str = "15utfaladkwvgrsdwfpqrkouvxiaismnujcxpmgpqckyfelnhhbb"
|
|
||||||
deck_str = "15vxsmoiybhkgamdagwcsbeuqpwdarfhukfvifnutxjcknrqppll"
|
|
||||||
deck = decompress_deck(deck_str)
|
|
||||||
print(deck)
|
print(deck)
|
||||||
|
|
Loading…
Reference in a new issue