import os , json folder = "./images/" #load the json information with open("cards.json", "r") as collage: cards = json.load(collage) #html all_cards = "" for card in cards["cards"]: print(card) #html image element img = f"" #img = "" #define title title = card['name'] #printing to inspect print(img) #mini template for card if card['image'] == "": card = f"""
{ card['text'] }
{ img }
{ card['text'] }