Fixed NextNum and NextChar bug. Also changed all mentions of Version to

be (Version = "5.1") for easier replacement for new updates.
This commit is contained in:
sarah committed 2026-04-28 15:36:44 +02:00
1 parent 84d61d9381
commit 2afadaebc8
5 files changed
+17 -17

No files matched your search

+5 -5
View File
@@ -6,7 +6,7 @@ import shutil
import time
import toml
# Version 5.0
# Version = "5.1"
ConfPath = "./GlobalConf.toml"
@@ -327,8 +327,9 @@ def DecideNewPath(FilePath):
if ConfVars["NextNum"] in File["NewFileName"]:
ConfData = toml.load(OutDirConfPath)
NewNum = (int(File["NextNum"]) + 1)
Width = len(File["NextNum"])
NewNum = str((int(File["NextNum"]) + 1)).rjust(Width, "0")
print(File["NextNum"],"=>",NewNum)
for Item in ConfData.get("Files", []):
if Item.get("Pattern") == File["Pattern"]:
@@ -338,7 +339,7 @@ def DecideNewPath(FilePath):
with open(OutDirConfPath, "w", encoding="utf-8") as ConfFile:
toml.dump(ConfData, ConfFile)
TextOutput = Parse(String = ConfLog["ValueSet"], VarCall = f"NextChar to {NewNum}")
TextOutput = Parse(String = ConfLog["ValueSet"], VarCall = f"NextNum to {NewNum}")
LogWrite(TextOutput)
Speak(TextOutput)
@@ -510,5 +511,4 @@ def Main():
LogWrite(TextOutput)
Speak(TextOutput)
Init()