reformatted
This commit is contained in:
parent
3e39d519c9
commit
e514ad8f42
1 changed files with 5 additions and 3 deletions
8
cleanfilenames.py
Normal file → Executable file
8
cleanfilenames.py
Normal file → Executable file
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import sys, re, os
|
import sys, re, os
|
||||||
|
|
||||||
errortxt = " mydirectory\nRenames _all_ strange filenames in a given directory. No other options, edit the source."
|
errortxt = " /some/directory\nRenames _all_ strange filenames in a given directory. No other options, edit the source."
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
# Check for one single commandlineparameter
|
# Check for one single commandlineparameter
|
||||||
|
@ -13,8 +13,10 @@ except:
|
||||||
|
|
||||||
# Regex to eliminate everything not belonging into a filename
|
# Regex to eliminate everything not belonging into a filename
|
||||||
# Ey, this is not zombiecode!
|
# Ey, this is not zombiecode!
|
||||||
# whitelist="[^a-z.A-Z0-9äöüÄÖÜß_+-]" # All trash eliminate
|
|
||||||
# whitelist="[^a-z.A-Z0-9äöüÄÖÜß_+-][^a-z.A-Z0-9äöüÄÖÜß_+-]*" # Reduce trash to "-"
|
# whitelist = "[^a-z.A-Z0-9äöüÄÖÜß_+-]" # All trash eliminate
|
||||||
|
# whitelist = "[^a-z.A-Z0-9äöüÄÖÜß_+-][^a-z.A-Z0-9äöüÄÖÜß_+-]*" # Reduce trash to "-"
|
||||||
|
|
||||||
whitelist = "[^a-z.A-Z0-9äöüÄÖÜß_+-][^a-z.A-Z0-9äöüÄÖÜß_+-]*"
|
whitelist = "[^a-z.A-Z0-9äöüÄÖÜß_+-][^a-z.A-Z0-9äöüÄÖÜß_+-]*"
|
||||||
cutminus = "^-+"
|
cutminus = "^-+"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue