mirror of
https://github.com/Paillat-dev/FABLE.git
synced 2026-01-02 09:16:20 +00:00
8 lines
235 B
Python
8 lines
235 B
Python
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 |