diff --git a/repartir_taches/config.py b/repartir_taches/config.py index 1ab828d..98baec2 100644 --- a/repartir_taches/config.py +++ b/repartir_taches/config.py @@ -14,6 +14,7 @@ class Task: notes: str time: str nb_groups: int + referent: t.Optional[str] = None assigned: t.Optional[list[int]] = None @@ -91,6 +92,7 @@ class Config: notes=task.get("notes", ""), time=task.get("heure", ""), nb_groups=int(task.get("nb_groupes", 1)), + referent=task.get("ref", None), ) def _load_people(self) -> None: @@ -103,6 +105,8 @@ class Config: # Normalize def normalize(x: str) -> str: x = x.strip() + if not x: + return "" for sep in (" ", "-"): if sep in x: return sep.join(map(normalize, x.split(sep))) diff --git a/repartir_taches/templates/repartition.tex.j2 b/repartir_taches/templates/repartition.tex.j2 index 4a3639e..16c29aa 100644 --- a/repartir_taches/templates/repartition.tex.j2 +++ b/repartir_taches/templates/repartition.tex.j2 @@ -9,6 +9,8 @@ \usepackage[most]{tcolorbox} \usepackage[french]{babel} +\setmainfont{Latin Modern Sans} + \title{\vspace{-1.5cm}Répartition des tâches} \author{} \date{\vspace{-2.5cm}} @@ -16,8 +18,7 @@ {% endraw %} {% for num in range((groupes|length) + 1) %} -\definecolor{groupe{{- num -}} }{HTML}{ {{- couleur[num % (couleur|length)] -}} } -{% endfor %} +\definecolor{groupe{{- num -}} }{HTML}{ {{- couleur[num % (couleur|length)] -}} }{% endfor %} {% raw %} @@ -29,6 +30,7 @@ ]{#1} } \newcommand{\heure}[1]{\normalfont #1} +\newcommand{\referent}[1]{\normalfont (voir avec \textbf{#1})} \newmdenv[roundcorner=10pt]{mdtask} @@ -55,4 +57,30 @@ {% include 'category.tex.j2' %} {% endfor %} + \vfill + \begin{mdtask}[ + frametitle=En cas d'urgence, + linecolor=red, linewidth=3pt] + + Le réseau téléphonique marche difficilement. Essayer de \emph{prévenir le CA + de vive voix} de préférence. + + Si vous vous sentez mal à l'aise dans une situation --~qu'il s'agisse de propos + déplacés, de non-respect de votre consentement, etc.~--, vous pouvez contacter + \textbf{Cécile} ou \textbf{Raphaël} («~consentement~»), ou en parler à toute + autre personne du CA. + + \textbf{Théo} et \textbf{Nina}, marqués «~dispo h24~» sont joignables à toute + heure en cas de soucis, et restent en particulier sobres pendant la soirée. + + \vspace{1em} + + \begin{tabular}{l l l l} + \textbf{Théo} & 06 13 84 21 81 & dispo h24 & \\ + \textbf{Nina} & 06 46 19 13 06 & dispo h24 &\\ + \textbf{Cécile} & 07 81 25 30 76 & & consentement \\ + \textbf{Raphaël} & 06 33 15 33 77 & & consentement\\ + \textbf{Charlotte} & 07 86 39 41 11 & & \\ + \end{tabular} + \end{mdtask} \end{document} diff --git a/repartir_taches/templates/tache.tex.j2 b/repartir_taches/templates/tache.tex.j2 index 7ef1948..915f659 100644 --- a/repartir_taches/templates/tache.tex.j2 +++ b/repartir_taches/templates/tache.tex.j2 @@ -1,6 +1,7 @@ \vbox{ \begin{mdtask}[ frametitle={ {{- cat.name -}} + {%- if cat.referent %}\quad\referent{ {{-cat.referent-}} }{% endif %} {%- if cat.time %} \hfill{} \heure{ {{-cat.time-}} }{% endif %}} ] {{ cat.descr|md_format|escape_latex }} \\