diff --git a/processing/content.py b/processing/content.py index 25e003e..255c15d 100644 --- a/processing/content.py +++ b/processing/content.py @@ -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"