Add dynamic qualification content

This commit is contained in:
Marty Oehme 2023-06-22 18:03:59 +02:00
parent 14be4ea1ca
commit a1d41cc2ac
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
4 changed files with 57 additions and 2 deletions

View file

@ -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

View file

@ -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
@ -23,6 +25,7 @@ def experience_to_md(data: dict[str, Any], lang: str = "en", headline: str = "")
return md
def education_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
if "education" not in data:
return
@ -34,3 +37,17 @@ def education_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
)
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

View file

@ -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)))
```

View file

@ -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)))
```