From 332b071fabc5f1695466484240366bc8fd9713d3 Mon Sep 17 00:00:00 2001 From: Sarahtonin Date: Mon, 6 Apr 2026 00:02:22 +0200 Subject: [PATCH] Added a Running parameter to Config.toml. If it's 1, the program runs. If it's 0, it stops. --- Config.toml | 7 ++++--- SaraSortd.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Config.toml b/Config.toml index 2494d5a..320598b 100644 --- a/Config.toml +++ b/Config.toml @@ -1,4 +1,5 @@ Title = "SaraSortd Config" +Running = 0 SafeMode = 1 SilentMode = 0 CheckInput = 3 @@ -19,9 +20,9 @@ Second = "[s]" VarCall = "%%" [DirectoryPaths] -RootDir = "Unset" -InputDir = [ "%RootDir%"] -OutputDir = [ "%RootDir%/Output"] +RootDir = ["Unset"] +InputDir = [ "%RootDir%",] +OutputDir = [ "%RootDir%/Output",] LogDir = "%RootDir%/.Logs" FailedDir = "%RootDir%/.Failed" diff --git a/SaraSortd.py b/SaraSortd.py index e841864..93223cb 100644 --- a/SaraSortd.py +++ b/SaraSortd.py @@ -310,6 +310,7 @@ def Init(): LogWrite(TextOutput) Speak(TextOutput) + UpdateConf(ConfPath, "Running", 1) Main() else: @@ -326,7 +327,7 @@ def Main(): Output = Parse(String = Output) Dir(Output) - while True: + while (GetConf("Running", ConfPath) == 1): for Input in ConfDirs["InputDir"]: InputPath = Parse(Input)