First cli commit

This commit is contained in:
2025-09-05 17:59:19 +03:00
parent 85b8043a73
commit 833e0ed2c8
2 changed files with 47 additions and 0 deletions

3
CLI/Config.ini Normal file
View File

@@ -0,0 +1,3 @@
[DEFAULT]
version = 1.12

44
CLI/Init.py Normal file
View File

@@ -0,0 +1,44 @@
import configparser
from pathlib import Path
#declare default vars
version = 01.02
#declare files
config = configparser.ConfigParser()
configPath = Path("Config.ini")
def makeConfig():
config['DEFAULT'] = {'Version': version}
with open('Config.ini', 'w') as configfile:
config.write(configfile)
def loadConfig():
config.read(configPath)
version = config["DEFAULT"]["Version"]
if configPath.exists():
print("The Config file exists.")
loadConfig()
else:
print("The file Config does not exist. - Creating")
makeConfig()
print("Tiropit Launcher CLI - Release Branch")
print(f"===========================[{version}]")