def get_xds_commands(lines_of_input):
    """Get the command input to XDS - that is, all of the text between
    the line which goes ***** STEP ***** and **********. Love FORTRAN."""
    collecting = False
    result = []
    for l in lines_of_input:
        if '*****' in l and not collecting:
            collecting = True
            continue
        if '*****' in l:
            break
        if collecting:
            if l.strip():
                result.append(l.strip())
    return result
