add method to directly generate link to replay
This commit is contained in:
parent
ba8313b4bb
commit
91aa786ef9
@ -189,3 +189,7 @@ def decompressJSONGame(game_str: str)->dict:
|
||||
"variant": variant_name(int(variant_id))
|
||||
}
|
||||
return game
|
||||
|
||||
def link(game_json: dict) -> str:
|
||||
compressed = compressJSONGame(game_json)
|
||||
return "https://hanab.live/replay-json/{}".format(compressed)
|
||||
|
Loading…
Reference in New Issue
Block a user