Browse Source

minor cleanup

master
NCLanceman 9 hours ago
parent
commit
6e885e0df9
  1. 5
      README.md
  2. 30
      doomstarter.py

5
README.md

@ -1,4 +1,4 @@
DOOMSTARTER # DOOMSTARTER
A Python script for running Doom, handling numerous sourceports, A Python script for running Doom, handling numerous sourceports,
maps, and gameplay WADs. maps, and gameplay WADs.
@ -6,4 +6,5 @@ maps, and gameplay WADs.
(11/10/25) Initial Commit: Works on my machine! (11/10/25) Initial Commit: Works on my machine!
(11/20/25) Approaching basic functionality: Reads and writes basic settings file (11/20/25) Approaching basic functionality: Reads and writes basic settings file
# doomstarter

30
doomstarter.py

@ -19,8 +19,8 @@ def settingsReader(mainDict, file):
settings = ((open(file)).read()).splitlines() settings = ((open(file)).read()).splitlines()
for i in settings: for i in settings:
print("Examining " + i) # print("Examining " + i)
print("Current Setting is: " + currentSetting) # print("Current Setting is: " + currentSetting)
counterName = str(counter).zfill(2) counterName = str(counter).zfill(2)
if (i == "[Source Ports]"): if (i == "[Source Ports]"):
@ -135,15 +135,18 @@ def settingsGen(mapList, gameList, miscList):
# Add the maps # Add the maps
result = result + "[Maps]\n" result = result + "[Maps]\n"
for i in mapList: for i in mapList:
result = result + str(i) + "\n" if ((i.split('.'))[1].lower() == "wad"):
result = result + str(i) + "\n"
# Add the gameplay wads # Add the gameplay wads
result = result + "[Gameplay]\n" result = result + "[Gameplay]\n"
for i in gameList: for i in gameList:
result = result + str(i) + "\n" if ((i.split('.'))[1].lower() == "wad"):
result = result + str(i) + "\n"
# Add misc wads # Add misc wads
result = result + "[Misc]\n" result = result + "[Misc]\n"
for i in miscList: for i in miscList:
result = result + str(i) + "\n" if ((i.split('.'))[1].lower() == "wad"):
result = result + str(i) + "\n"
result = result + "[Last Used]" result = result + "[Last Used]"
return result return result
@ -260,7 +263,7 @@ else:
print(settingsDict) print(settingsDict)
print("\n\n Saving to new file!") print("\n\n Saving to new file!")
with open("dictSettings.txt", "w") as f: with open("settings.txt", "w") as f:
f.write(settingsSave(settingsDict)) f.write(settingsSave(settingsDict))
f.close() f.close()
@ -269,21 +272,6 @@ else:
# + " ./gameplay/PVT_STONE_V12_5.wad", shell = True) # + " ./gameplay/PVT_STONE_V12_5.wad", shell = True)
# subprocess.run(sourceport_dict["Woof"]["runcommand"], shell=True) # subprocess.run(sourceport_dict["Woof"]["runcommand"], shell=True)
# print("Listing everything in Maps...")
# print(os.listdir("./maps/"))
# print("Listing everything in Gameplay...")
# print(os.listdir("./gameplay/"))
# print("Listing everything in Misc...")
# print(os.listdir("./misc/"))
# TODO: Now that I can read a settings file, create one
# TODO: Throw everything into the settingsDict
# TODO: Add an option for adding details for given entries.
# Configure SourcePort # Configure SourcePort
# Add Gameplay WAD (optional) # Add Gameplay WAD (optional)

Loading…
Cancel
Save