import markdown import os for mdf in os.listdir("docs"): markdown.markdownFromFile( input="docs/" + mdf, output="data/tests/html/{0}.html".format(mdf.split(".")[0]), extensions=["fenced_code"], )