mirror of
https://git.srhtnin.garden/sarah/SaraSortd.git
synced 2026-10-13 18:38:11 +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
+5
-4
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user