Add subdued coloring for publications
This commit is contained in:
parent
5286d11052
commit
0433985cd6
1 changed files with 16 additions and 2 deletions
|
@ -8,17 +8,31 @@ def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
|||
|
||||
return md
|
||||
|
||||
def _publication_md(publication: str, subdued: bool):
|
||||
md = "> "
|
||||
if subdued:
|
||||
md += "\\textcolor{publication}{"
|
||||
md += publication
|
||||
if subdued:
|
||||
md += "}"
|
||||
return f"{md}\n\n"
|
||||
|
||||
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 = "",
|
||||
subdued_publications: bool = True,
|
||||
):
|
||||
if "experience" not in data:
|
||||
return
|
||||
|
||||
md = f"{headline}\n\n"
|
||||
md += "\\definecolor{publication}{rgb}{0.5,0.5,0.5}\n\n"
|
||||
for exp in data["experience"]:
|
||||
md += f"## {exp['title'][lang]}\\hfill{exp['date'][lang]}\n\n"
|
||||
|
||||
if "publication" in exp:
|
||||
md += f"> {exp['publication'][lang] or ''}\n\n"
|
||||
md += _publication_md(exp['publication'][lang], subdued_publications)
|
||||
|
||||
for point in exp["bullets"]:
|
||||
md += f"* {point[lang]}\n"
|
||||
|
|
Loading…
Reference in a new issue