configfile: "config.yaml"

print(config)

rule hello_world:
    output: config['output']
    params:
        text=config['text'],
        times=config['times']
    threads: config['threads'] if config['threads'] else 1
    shell: 
        """
        for i in {{1..{params.times}}}; do echo {params.text}; done
        for i in {{1..{params.times}}}; do echo {params.text} >> {output}; done
        """

rule error:
    output: 'error'
    shell: "exit 1"
