Skip to content

Commit

Permalink
organize directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuh4 committed Jun 17, 2024
1 parent da52488 commit 20826fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/parse_apiref.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,5 +407,8 @@ def parseAll(dir: str) -> list[NoirValue]:
valuesForFiles[value.path].append(markdown)

for path, markdown in valuesForFiles.items():
with open(f"../apiref/{os.path.basename(path)}.md", "w", encoding="utf-8") as file:
writePath = f"../apiref/{os.path.relpath(path)}"
os.makedirs(os.path.dirname(writePath), exist_ok = True)

with open(f"{writePath}.md", "w", encoding="utf-8") as file:
file.write("\n\n---\n\n".join(markdown))

0 comments on commit 20826fe

Please sign in to comment.