import pathlib import mistune markdown = mistune.create_markdown(renderer=None) root = pathlib.Path(__file__).parent.parent exams = root / "content" / "Anatomi & Histologi 2" / "Gamla tentor" print(exams.absolute()) for file in sorted(exams.glob("*/*.md")): if len(file.stem) > 2: continue print(f"Parsing {file}") tokens = markdown(file.read_text(encoding="utf-8")) import pprint pprint.pprint(tokens)