Add dynamic qualification content
This commit is contained in:
parent
14be4ea1ca
commit
a1d41cc2ac
4 changed files with 57 additions and 2 deletions
30
content.yml
30
content.yml
|
@ -71,3 +71,33 @@ education:
|
||||||
de: 2021
|
de: 2021
|
||||||
en: 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
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
|
||||||
def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
||||||
if "summary" not in data:
|
if "summary" not in data:
|
||||||
return
|
return
|
||||||
|
@ -7,6 +8,7 @@ def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
||||||
|
|
||||||
return md
|
return md
|
||||||
|
|
||||||
|
|
||||||
def experience_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
def experience_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
||||||
if "experience" not in data:
|
if "experience" not in data:
|
||||||
return
|
return
|
||||||
|
@ -23,6 +25,7 @@ def experience_to_md(data: dict[str, Any], lang: str = "en", headline: str = "")
|
||||||
|
|
||||||
return md
|
return md
|
||||||
|
|
||||||
|
|
||||||
def education_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
def education_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
||||||
if "education" not in data:
|
if "education" not in data:
|
||||||
return
|
return
|
||||||
|
@ -34,3 +37,17 @@ def education_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
||||||
)
|
)
|
||||||
|
|
||||||
return md
|
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
|
||||||
|
|
|
@ -32,3 +32,7 @@ display(Markdown(content.experience_to_md(data, headline="# Berufserfahrung", la
|
||||||
```{python}
|
```{python}
|
||||||
display(Markdown(content.education_to_md(data, headline="# Ausbildung", lang=lang)))
|
display(Markdown(content.education_to_md(data, headline="# Ausbildung", lang=lang)))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```{python}
|
||||||
|
display(Markdown(content.qualifications_to_md(data, headline="# Qualifikationen", lang=lang)))
|
||||||
|
```
|
||||||
|
|
|
@ -30,3 +30,7 @@ display(Markdown(content.experience_to_md(data, headline="# Professional experie
|
||||||
```{python}
|
```{python}
|
||||||
display(Markdown(content.education_to_md(data, headline="# Education", lang=lang)))
|
display(Markdown(content.education_to_md(data, headline="# Education", lang=lang)))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```{python}
|
||||||
|
display(Markdown(content.qualifications_to_md(data, headline="# Qualifications", lang=lang)))
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue