def slugify(text, delim=u'-'):
    """
    Generates a an ASCII-only slug.

    .. Author Armin Ronacher: http://flask.pocoo.org/snippets/5/
    """
    result = []
    for word in _punct_re.split(unicode(text).lower()):
        nword = normalize('NFKD', word).encode('ascii', 'ignore')
        if nword:
            # Filter out non-printable
            pword = ''.join([i for i in nword if ord(i) > 31])
            result.append(pword)
    return unicode(delim.join(filter(bool, result)))
dataset/ETHPy150Open robmadole/jig/src/jig/tools.py/slugify/original