def shorten_titl(str_in, nout=5):
    """Shorten the title with *, so it can still be matched by
    glob"""
    if len(str_in) > nout * 2:
        str_out = str_in[:5] + '*' + str_in[-5:]
    else:
        str_out = str_in
    return str_out