def get_ccp4_commands(lines_of_input):
    """Get the commands which were sent to a CCP4 program."""
    logicals = {}
    for line in lines_of_input:
        if 'Logical Name:' in line:
            token = line.split(':')[1].split()[0]
            value = line.split(':')[-1].strip()
            logicals[token] = value
    script = []
    for line in lines_of_input:
        if 'Data line---' in line:
            script.append(line.replace('Data line---', '').strip())
    return script, logicals
