def safe_id(name, len=5):
    if name is None:
        return None
    name = slugify(os.path.basename(name)).strip('-')
    name = name.ljust(len, '_')
    return name
Remove potential path escapes from a content ID.
dataset/ETHPy150Open pudo/archivekit/archivekit/util.py/safe_id