import sys import markdown #filename = './source/Thun.md' filename = sys.argv[-1] with open(filename, encoding="UTF_8") as f: text = f.read() def title_of(html): return html[html.find('