Added an option to write directory configs or not.

This commit is contained in:
sarah committed 2026-04-06 01:41:24 +02:00
1 parent 5dbc03ff7f
commit 42adeae8b7
3 files changed
+8 -13

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@ SilentMode = 0
CheckInput = 3
DotFiles = 0
Logging = 1
WriteDirConf = 1
[Variables]
NextNum = "!"
@@ -21,7 +22,7 @@ VarCall = "%%"
[DirectoryPaths]
RootDir = "Unset"
InputDir = [ "%RootDir%"]
InputDir = [ "%Pic%/Input"]
OutputDir = [ "%RootDir%/Output"]
LogDir = "%RootDir%/.Logs"
FailedDir = "%RootDir%/.Failed"
+1 -8
View File
@@ -3,14 +3,7 @@ LastFile = "Unset"
ParentDir = "Unset"
[[Files]]
Pattern = "*.jpg"
NewFileName = "~^"
NextNum = 1
NextChar = "A"
CaseSensitive = 0
[[Files]]
Pattern = "*.png"
Pattern = "*"
NewFileName = "~^"
NextNum = 1
NextChar = "A"
+5 -4
View File
@@ -194,10 +194,11 @@ def Dir(Path, Output = True, CopyConf = True):
os.makedirs(Path, exist_ok=True)
if (CopyConf):
Clone("DirConfig.toml", Path, f"{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml")
UpdateConf(f"{Path}/{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml", "ParentDir", ParentName)
UpdateConf(f"{Path}/{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml", "Title", f"{ParentName} Config")
NewDirConf = f"{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml"
if (Conf["WriteDirConf"] == 1 or not os.path.exists(os.path.join(f"{Path}/{NewDirConf}"))):
Clone("DirConfig.toml", Path, NewDirConf)
UpdateConf(f"{Path}/{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml", "ParentDir", ParentName)
UpdateConf(f"{Path}/{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml", "Title", f"{ParentName} Config")
if (Output):
ParsedPath = Parse(String = Path)