From a1d41cc2ace079cf15536c3009716cd9bcc76ffb Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 22 Jun 2023 18:03:59 +0200 Subject: [PATCH] Add dynamic qualification content --- content.yml | 30 ++++++++++++++++++++++++++++++ processing/content.py | 21 +++++++++++++++++++-- resume_de.qmd | 4 ++++ resume_en.qmd | 4 ++++ 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/content.yml b/content.yml index 6e288e3..4b0a44a 100644 --- a/content.yml +++ b/content.yml @@ -71,3 +71,33 @@ education: de: 2021 en: 2021 +skills: + - de: Digitales Toolset + en: Digital toolset + content: + - name: + de: Versionskontrollsoftware + en: Version control software + items: + - de: git + en: git + - name: + de: Office-Suite + en: Office suite + items: + - de: Excel + en: Excel + - de: Word + en: Word + - de: Access + en: Access + - name: + de: Autorensoftware + en: Authoring software + items: + - de: LaTeX + en: LaTeX + - de: Pandoc + en: pandoc + - de: quarto + en: quarto diff --git a/processing/content.py b/processing/content.py index f8110db..f69dfb3 100644 --- a/processing/content.py +++ b/processing/content.py @@ -1,5 +1,6 @@ from typing import Any + def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): if "summary" not in data: return @@ -7,6 +8,7 @@ def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): return md + def experience_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): if "experience" not in data: return @@ -19,10 +21,11 @@ def experience_to_md(data: dict[str, Any], lang: str = "en", headline: str = "") md += f"> {exp['publication'][lang]}\n\n" for point in exp["bullets"]: - md+=f"* {point[lang]}\n" + md += f"* {point[lang]}\n" return md + def education_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): if "education" not in data: return @@ -30,7 +33,21 @@ def education_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): md = f"{headline}\n\n" for edu in data["education"]: md += ( - f"{edu['place'][lang]}\n\n: {edu['program'][lang]};{edu['date'][lang]}\n\n" + f"{edu['place'][lang]}\n\n: {edu['program'][lang]}; {edu['date'][lang]}\n\n" ) return md + + +def qualifications_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): + if "skills" not in data: + return + + md = f"{headline}\n\n" + for skillset in data["skills"]: + md += f"{skillset[lang]}\n\n" + for content in skillset["content"]: + md += f": {content['name'][lang]} ({', '.join([item[lang] for item in content['items']])})\n" + md += "\n" + + return md diff --git a/resume_de.qmd b/resume_de.qmd index 760f2ba..2a1ed38 100644 --- a/resume_de.qmd +++ b/resume_de.qmd @@ -32,3 +32,7 @@ display(Markdown(content.experience_to_md(data, headline="# Berufserfahrung", la ```{python} display(Markdown(content.education_to_md(data, headline="# Ausbildung", lang=lang))) ``` + +```{python} +display(Markdown(content.qualifications_to_md(data, headline="# Qualifikationen", lang=lang))) +``` diff --git a/resume_en.qmd b/resume_en.qmd index 6988235..d4c8eaf 100644 --- a/resume_en.qmd +++ b/resume_en.qmd @@ -30,3 +30,7 @@ display(Markdown(content.experience_to_md(data, headline="# Professional experie ```{python} display(Markdown(content.education_to_md(data, headline="# Education", lang=lang))) ``` + +```{python} +display(Markdown(content.qualifications_to_md(data, headline="# Qualifications", lang=lang))) +```