some things
This commit is contained in:
@ -11,6 +11,21 @@ IMAGE_SIZE = (1800, 1200)
|
||||
|
||||
MARGINS = 60
|
||||
|
||||
def read_file(path: str) -> dict:
|
||||
with open(path, "r", encoding="utf-8") as file:
|
||||
game_dict = dict(
|
||||
[tuple(line.split(":")) for line in file.read().split('\n')]
|
||||
)
|
||||
|
||||
return game_dict
|
||||
|
||||
def write_file(path: str, game: dict):
|
||||
game_string = "\n".join(
|
||||
[f"{key}:{value}" for key, value in game.items()]
|
||||
)
|
||||
|
||||
with open(path, "w", encoding="utf-8") as file:
|
||||
file.write(game_string)
|
||||
|
||||
def base64(num: int) -> str:
|
||||
temp = ""
|
||||
|
Reference in New Issue
Block a user