mirror of
https://git.srhtnin.garden/sarah/SaraSortd.git
synced 2026-10-13 18:38:11 +02:00
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:
1 parent
84d61d9381
commit
2afadaebc8
5 files changed
+17
-17
No files matched your search
+5
-5
@@ -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()
|
||||
Reference in new issue
Block a user