# replaced with dashes.
#
def MakeFilename(s):
- # This RE is shitty, but I can't think of a better one right now
- fn = re.sub("[?!'&#:;_*()/\\,.]+", "", s)
+ # Cleans up the file name, removing all non ASCII or .-_ chars
+ fn = re.sub(r'[^.-_a-zA-Z0-9]', '', s)
fn = fn.lower()
fn = fn.replace(' ', '-')
return fn
if not quiet:
print('Processed ' + str(fileCount) + ' files.')
-