mirror of
https://git.srhtnin.garden/sarah/SaraSortd.git
synced 2026-10-15 02:53:17 +02:00
Added an option to write directory configs or not.
This commit is contained in:
1 parent
5dbc03ff7f
commit
42adeae8b7
3 files changed
+8
-13
No files matched your search
+2
-1
@@ -4,6 +4,7 @@ SilentMode = 0
|
|||||||
CheckInput = 3
|
CheckInput = 3
|
||||||
DotFiles = 0
|
DotFiles = 0
|
||||||
Logging = 1
|
Logging = 1
|
||||||
|
WriteDirConf = 1
|
||||||
|
|
||||||
[Variables]
|
[Variables]
|
||||||
NextNum = "!"
|
NextNum = "!"
|
||||||
@@ -21,7 +22,7 @@ VarCall = "%%"
|
|||||||
|
|
||||||
[DirectoryPaths]
|
[DirectoryPaths]
|
||||||
RootDir = "Unset"
|
RootDir = "Unset"
|
||||||
InputDir = [ "%RootDir%"]
|
InputDir = [ "%Pic%/Input"]
|
||||||
OutputDir = [ "%RootDir%/Output"]
|
OutputDir = [ "%RootDir%/Output"]
|
||||||
LogDir = "%RootDir%/.Logs"
|
LogDir = "%RootDir%/.Logs"
|
||||||
FailedDir = "%RootDir%/.Failed"
|
FailedDir = "%RootDir%/.Failed"
|
||||||
|
|||||||
+1
-8
@@ -3,14 +3,7 @@ LastFile = "Unset"
|
|||||||
ParentDir = "Unset"
|
ParentDir = "Unset"
|
||||||
|
|
||||||
[[Files]]
|
[[Files]]
|
||||||
Pattern = "*.jpg"
|
Pattern = "*"
|
||||||
NewFileName = "~^"
|
|
||||||
NextNum = 1
|
|
||||||
NextChar = "A"
|
|
||||||
CaseSensitive = 0
|
|
||||||
|
|
||||||
[[Files]]
|
|
||||||
Pattern = "*.png"
|
|
||||||
NewFileName = "~^"
|
NewFileName = "~^"
|
||||||
NextNum = 1
|
NextNum = 1
|
||||||
NextChar = "A"
|
NextChar = "A"
|
||||||
|
|||||||
+5
-4
@@ -194,10 +194,11 @@ def Dir(Path, Output = True, CopyConf = True):
|
|||||||
os.makedirs(Path, exist_ok=True)
|
os.makedirs(Path, exist_ok=True)
|
||||||
|
|
||||||
if (CopyConf):
|
if (CopyConf):
|
||||||
Clone("DirConfig.toml", Path, f"{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml")
|
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}"))):
|
||||||
UpdateConf(f"{Path}/{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml", "ParentDir", ParentName)
|
Clone("DirConfig.toml", Path, NewDirConf)
|
||||||
UpdateConf(f"{Path}/{Parse(String = ConfNames["DirConfName"], Path = ConfPath, Parent = ParentName)}.toml", "Title", f"{ParentName} Config")
|
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):
|
if (Output):
|
||||||
ParsedPath = Parse(String = Path)
|
ParsedPath = Parse(String = Path)
|
||||||
|
|||||||
Reference in new issue
Block a user