mirror of
https://github.com/Paillat-dev/FABLE.git
synced 2026-01-02 01:06:20 +00:00
I mean its the biggest commit I ever did (did git add * cause I didn't want to explain all of this It's already so complicated)
This commit is contained in:
8
utils/normalize_file.py
Normal file
8
utils/normalize_file.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import re
|
||||
|
||||
async def normalize_file(filename):
|
||||
filename = re.sub(r'[<>:"|?*\s]', '_', filename)
|
||||
#also shorten the filename if it's too long
|
||||
if len(filename) > 30:
|
||||
filename = filename[:27] + "___"
|
||||
return filename
|
||||
Reference in New Issue
Block a user