paceboard/scripts/setup.py

32 lines
936 B
Python
Raw Normal View History

2021-06-25 18:55:15 +01:00
#!/usr/bin/env python3
### Initial configuration script for paceboard. Handles adding data to config.csv.
2021-06-23 18:28:00 +01:00
from utils import csv as util_csv
divider = "----------"
print(
2021-06-23 21:06:29 +01:00
f"\nWelcome to paceboard! Let's set up your leaderboard site :)\nWe'll save this info in csv/config.csv\n\n{divider}\n"
2021-06-23 18:28:00 +01:00
)
2021-06-28 03:40:15 +01:00
# All input handling
2021-06-26 04:59:37 +01:00
tk_game_name = input("Your game's name: ").replace('"', "")
tk_game_description = input("Description for your game: ").replace('"', "")
2021-06-25 18:35:35 +01:00
tk_url = input("URL of your site (format - foobar.com): ")
2021-06-26 04:59:37 +01:00
tk_logo_alt = input(
"Description of your game's logo (this is used for alt-text): "
).replace('"', "")
2021-06-23 18:28:00 +01:00
2021-06-28 03:40:15 +01:00
# Define config dictionary
2021-06-23 21:06:29 +01:00
configDict = {
2021-06-24 00:38:47 +01:00
"tk_game_name": tk_game_name,
"tk_game_description": tk_game_description,
2021-06-23 21:06:29 +01:00
"tk_url": tk_url,
"tk_logo_alt": tk_logo_alt,
}
2021-06-28 03:40:15 +01:00
# Write to csv
util_csv.dictWriter("../csv/config.csv", configDict)
2021-06-24 00:38:47 +01:00
2021-06-27 20:08:08 +01:00
print(f"\n{divider}\n\nPerfect, that's all for now! <3")