Fixed most everything to work well enough. TODO: Add input folders, sorting, and output folders.

This commit is contained in:
sarah committed 2026-04-02 22:01:24 +02:00
1 parent ef5b40ffef
commit 51ecfe53b5
4 files changed
+229 -128

No files matched your search

+31 -39
View File
@@ -1,47 +1,39 @@
Title = "SaraSortd Config"
SafeMode = 1
SilentMode = 0
CheckInput = 10
OutputDir = [ "Log",]
SafeMode = 1 # If SaraSortd should stop if an error with the config appears. 1 is stop, 0 is continue.
SilentMode = 0 # If SaraSortd should write stuff to the terminal as well.
[Variables] # Only use these in config files, not the actual file names themselves..
NextNum = "*" # The next available number. If 1 already exists, 2 will be used. Starts at 1.
NextChar = "&" # The next available character. If A already exists, B will be used.
Parent = "@" # The name of the parent directory.
OrgFileName = "~" # The original name of the sorted file. If "blahblah.txt" gets sorted, "~" would be equal to "blahblah".
OrgFileType = "^" # The original file type of the sorted file. If "example.png" gets sorted, "^" would be equal to ".png".
Year = "[y]" # The current year, E.G. "2026".
Month = "[m]" # The date of the current month, E.G. "03".
Day = "[d]" # The date of the current day, E.G. "27".
Hour = "[h]" # The current hour, E.G. "12".
Minute = "[n]" # The current minute, E.G. "44".
Second = "[s]" # The current second, E.G. "11".
VarCall = "%%" # The characters used at the start and end of variable calls. The first character is to the left; second is to the right.
# NOTE: If any parameters in the config uses just "%%", it gets a variable from the program itself, not from the config.
[Variables]
NextNum = "*"
NextChar = "&"
Parent = "@"
OrgFileName = "~"
OrgFileType = "^"
Year = "[y]"
Month = "[m]"
Day = "[d]"
Hour = "[h]"
Minute = "[n]"
Second = "[s]"
VarCall = "%%"
[DirectoryPaths]
RootDir = "Unset" # Parent directory. Folder where all SaraSortd folders live.
InputDir = ["%RootDir%"] # If files get put here, they'll be sorted.
OutputDir = ["%RootDir%"] # Where sortted files go.
LogDir = "%RootDir%/.Logs" # Where log files from SaraSortd go.
FailedDir =".%RootDir%/Failed" # For files that failed to be sorted.
RootDir = "/home/sarah/TESTDIR"
InputDir = [ "%RootDir%",]
OutputDir = [ "%RootDir%/Output",]
LogDir = "%RootDir%/.Logs"
FailedDir = "%RootDir%/.Failed"
[Names]
OutputFileName = "*_@^" # Name of sorted files.
LogFileName = "[y].[m].[d]_*" # Name of log files.
ConfFileName = ".@Config" # Name of config files for directories.
LogFileName = "[y].[m].[d]._*"
DirConfName = ".@Config"
[Log]
All = "[h]:[n]:[s] | " # What to put at the start of all lines in Log file.
Start = "Started: SaraSortd" # When SaraSortd starts.
NotStart = "Start Failed: SaraSortd." # When SaraSortd fails to start for some reason.
Sorted = "Sorted: ~^ to %SortDir%." # When a file gets sorted.
Unset = "Error: %% is not set." # When a parameter in the config is not set. %% is the parameter that wasn't set.
Set = "Set: %% to %%." # When a previously unset parameter in the config is set. %% is the parameter that got set.
All = "[h]:[n]:[s] | "
Start = "Started: SaraSortd"
NotStart = "Error: Failed to start SaraSortd."
Sorted = "Sorted: %% to %%."
ValueSet = "Set: %% to be %% in %%."
WrongType = "Error: %% is not a %%."
Unset = "Error: %% is not set."