def main(): template = read("template.moustache") questions = load("questions.yaml") answers = pyqa.ask(questions) data = pystache.render(template, answers) write("output.py", data) print("inspect output.py for results!")
def main(): answers_file = 'answers.json' template = read('template.moustache') questions = load('questions.yaml') original_answers = json.loads(read(answers_file) or '{}') answers = pyqa.ask(questions, original_answers) write(answers_file, json.dumps(answers)) data = pystache.render(template, answers) write('output.py', data) print('inspect output.py for results!')