Beispiel #1
0
def main(input_path, output_path):
    with open(input_path, 'r') as f:
        input_data = json.load(f)

    creator = Creator(input_data['style'])

    if not os.path.exists(output_path):
        os.makedirs(output_path)

    for card_name, card_data in input_data['cards'].items():
        creator.create_card(
            os.path.join(output_path, card_name + '.png'),
            card_data,
        )