import os import markdown # Get the directory path of the script script_dir = os.path.dirname(os.path.abspath(__file__)) materials = ['1_situation', '2_binding', '3_paperformat', '4_add_ons'] for folder in materials: md_folder = os.path.join(script_dir, folder) md_files = os.listdir(md_folder) print(md_files) for md_file in md_files: file_path = os.path.join(md_folder, md_file) with open(file_path, 'r') as file: md = file.read() html_md = markdown.markdown(md) print(html_md) #to create html file i need to create a template