generate blueprint

master
km0 3 years ago
parent d6468f9e2e
commit b358330992

File diff suppressed because one or more lines are too long

@ -5,20 +5,15 @@ import os
def dump():
# list all the folders
path = "postit/contents"
folders = [
name
for name in os.listdir()
if os.path.isdir(os.path.join("", name))
and not name.startswith(".")
and not name == "miri-the-leader"
f.path for f in os.scandir(path) if f.is_dir() and f.name != "miri-the-leader"
]
print(folders)
contents = []
for folder in folders:
with open(f"{folder}/contents.md", "r") as f:
with open(f"{folder}/contents.md", "r", encoding="utf8") as f:
metadata, body = frontmatter.parse(f.read())
for content in metadata["contents"]:
if type(content) == dict and content["img"]:

Loading…
Cancel
Save