def snakeify(uin):
    """Converts text to snake_case"""

    out = ""
    repeated = False
    spacing = (" ", "_", "-")

    for ind, i in enumerate(uin):
        if i not in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_- ":
            continue
        elif i in spacing:
            if repeated:
                continue

            out += "_"
            repeated = True
        else:
            out += i
            repeated = False
    
    return out.lower()