|
|
|
@ -14,26 +14,37 @@ def dump():
|
|
|
|
|
with open(f"{path}/{folder}/contents.md", "r", encoding="utf8") as f:
|
|
|
|
|
metadata, body = frontmatter.parse(f.read())
|
|
|
|
|
for content in metadata["contents"]:
|
|
|
|
|
if type(content) == dict and "img" in content:
|
|
|
|
|
if type(content) == dict:
|
|
|
|
|
|
|
|
|
|
if "img" in content:
|
|
|
|
|
postit = {
|
|
|
|
|
"title": metadata["title"],
|
|
|
|
|
"description": content["alt"],
|
|
|
|
|
"img": content["img"],
|
|
|
|
|
"slug": folder,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
postit = {
|
|
|
|
|
"title": metadata["title"],
|
|
|
|
|
"description": content["alt"],
|
|
|
|
|
"img": content["img"],
|
|
|
|
|
"slug": folder,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
elif type(content) == dict and "card" in content:
|
|
|
|
|
postit = {
|
|
|
|
|
"title": metadata["title"],
|
|
|
|
|
"card": content["card"],
|
|
|
|
|
"quote": content["quote"],
|
|
|
|
|
"motivation": content["motivation"],
|
|
|
|
|
"vision": content["vision"],
|
|
|
|
|
"emphaty": content["emphaty"],
|
|
|
|
|
"positivity": content["positivity"],
|
|
|
|
|
"slug": folder,
|
|
|
|
|
}
|
|
|
|
|
elif "card" in content:
|
|
|
|
|
postit = {
|
|
|
|
|
"title": metadata["title"],
|
|
|
|
|
"card": content["card"],
|
|
|
|
|
"quote": content["quote"],
|
|
|
|
|
"motivation": content["motivation"],
|
|
|
|
|
"vision": content["vision"],
|
|
|
|
|
"empathy": content["empathy"],
|
|
|
|
|
"positivity": content["positivity"],
|
|
|
|
|
"slug": folder,
|
|
|
|
|
}
|
|
|
|
|
elif "word" in content:
|
|
|
|
|
postit = {
|
|
|
|
|
"title": metadata["title"],
|
|
|
|
|
"definition": content['definition'],
|
|
|
|
|
"category": content['category'],
|
|
|
|
|
"start": content['start'],
|
|
|
|
|
"word": content['word'],
|
|
|
|
|
"direction": content['direction'],
|
|
|
|
|
"slug": folder
|
|
|
|
|
}
|
|
|
|
|
else:
|
|
|
|
|
postit = {
|
|
|
|
|
"title": metadata["title"],
|
|
|
|
|