summaryrefslogtreecommitdiff
path: root/scripts/utils.py
blob: 30bbde4c963c2601fea8c2eba3288814d355804d (plain)
1
2
3
4
5
6
7
8
# coding=utf-8

import re

_re_filenamify = re.compile(r''' |\.|;|,|:|"|'|\*|\(|\)|\/|\\|&|%|\$|\#|!|\n|\r|\t|\|''', re.MULTILINE)
def filenamefy(name):
    return '_'.join(_re_filenamify.split(name)).lower().strip('_')