add method to directly generate link to replay
This commit is contained in:
parent
ba8313b4bb
commit
91aa786ef9
1 changed files with 4 additions and 0 deletions
|
@ -189,3 +189,7 @@ def decompressJSONGame(game_str: str)->dict:
|
||||||
"variant": variant_name(int(variant_id))
|
"variant": variant_name(int(variant_id))
|
||||||
}
|
}
|
||||||
return game
|
return game
|
||||||
|
|
||||||
|
def link(game_json: dict) -> str:
|
||||||
|
compressed = compressJSONGame(game_json)
|
||||||
|
return "https://hanab.live/replay-json/{}".format(compressed)
|
||||||
|
|
Loading…
Reference in a new issue