from glob import glob import os import subprocess import jinja2 # https://devdocs.io/python~3.9/library/glob#glob.glob # files = glob("content/**", recursive=True) # print(files) print("---------") all_html = "" all_md = "" html=[] folders = glob("./*") print(folders) for folder in folders: files = glob(folder + "/*") print(files) print("************") for file in files: #print(file) if file.endswith(".md"): print("===========") file = file.replace(" ", "\ ") print(file) # pandoc2 = "pandoc -f markdown -t html " + file # html_data = subprocess.run(pandoc2, capture_output=True, text=True).stdout # print("html_data: ", html_data) # #editing the html before creatings the main file # # filename = os.path.basename(file) # # print("filename", filename) # # html_data = html_data.replace('