mirror of
https://git.srhtnin.garden/sarah/SaraSortd.git
synced 2026-10-13 18:38:11 +02:00
Added case sensitivity to sorting.
This commit is contained in:
1 parent
ab2b678a4d
commit
59bdf90775
3 files changed
+14
-5
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ Title = "SaraSortd Config"
|
|||||||
SafeMode = 1
|
SafeMode = 1
|
||||||
SilentMode = 0
|
SilentMode = 0
|
||||||
CheckInput = 3
|
CheckInput = 3
|
||||||
DotFiles = 1
|
DotFiles = 0
|
||||||
|
|
||||||
[Variables]
|
[Variables]
|
||||||
NextNum = "!"
|
NextNum = "!"
|
||||||
|
|||||||
+6
-3
@@ -1,8 +1,11 @@
|
|||||||
Title = "Unset"
|
Title = "Unset"
|
||||||
|
|
||||||
Files = [
|
[[Files]]
|
||||||
{Pattern = "*", NewFileName = "~^", NextNum = 1, NextChar = "A"},
|
Pattern = "*"
|
||||||
]
|
NewFileName = "~^"
|
||||||
|
NextNum = 1
|
||||||
|
NextChar = "A"
|
||||||
|
CaseSensitive = 0
|
||||||
|
|
||||||
LastFile = "Unset"
|
LastFile = "Unset"
|
||||||
ParentDir = "Unset"
|
ParentDir = "Unset"
|
||||||
+7
-1
@@ -241,7 +241,13 @@ def DecideNewPath(FilePath):
|
|||||||
LogWrite(TextOutput)
|
LogWrite(TextOutput)
|
||||||
Speak(TextOutput)
|
Speak(TextOutput)
|
||||||
|
|
||||||
if fnmatch.fnmatch(UnsortedFile, Pattern):
|
if (File["CaseSensitive"] == 1):
|
||||||
|
Match = fnmatch.fnmatchcase(UnsortedFile, Pattern)
|
||||||
|
|
||||||
|
else:
|
||||||
|
Match = fnmatch.fnmatch(UnsortedFile.lower(), Pattern.lower())
|
||||||
|
|
||||||
|
if Match:
|
||||||
NewFileName = File["NewFileName"]
|
NewFileName = File["NewFileName"]
|
||||||
|
|
||||||
if (ConfVars["NextNum"] in NewFileName):
|
if (ConfVars["NextNum"] in NewFileName):
|
||||||
|
|||||||
Reference in new issue
Block a user