Skip to content
Snippets Groups Projects
Commit 346e05bc authored by Daniel Schulte's avatar Daniel Schulte
Browse files

Updated the lumi-handout to be processed with jinja2 templates the same way lipclms does

parent 0a40fee2
No related branches found
No related tags found
No related merge requests found
handout.pdf.processed
venv/
To build a clean handout run ./compile.py
It requires you to have jinja2 installed (in a virtualenv)
#!/usr/bin/env python3
from jinja2 import Environment, FileSystemLoader
if __name__ == "__main__":
registration = dict()
registration["name"]="\hspace{6cm}"
registration["laptop_vendor"]="\hspace{4cm}"
registration["optimus"]=False
registration["dual_boot"]=False
sticks = []
env = Environment(loader=FileSystemLoader("."))
template = env.get_template("handout.tex")
with open("handout.tex.processed","w") as fd:
fd.write(template.render({"registration":registration,"sticks":sticks,"cleanhandout":True}))
../../../logos/alug.pdf
\ No newline at end of file
../../../logos/osak.png
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
\newcommand{\kopfrechts}{ \newcommand{\kopfrechts}{
{\large {\large
\begin{tabular}{r l} \begin{tabular}{r l}
Dein Name: & \underline{\hspace{6cm}}\\ Dein Name: & \underline{ {{ registration.name }} }\\
% Dein Pizza-Code: & \underline{\hspace{6cm}}\\ % Dein Pizza-Code: & \underline{\hspace{6cm}}\\
\end{tabular} \end{tabular}
} }
...@@ -129,7 +129,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex ...@@ -129,7 +129,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex
\end{minipage} \end{minipage}
\begin{minipage}{0.6\textwidth} \begin{minipage}{0.6\textwidth}
\vspace{1mm} \vspace{1mm}
\includegraphics[width=\textwidth]{battery-staple} \includegraphics[width=\textwidth]{data/battery-staple}
\end{minipage} \end{minipage}
\vspace{2mm} \vspace{2mm}
\begin{itemize} \begin{itemize}
...@@ -154,12 +154,12 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex ...@@ -154,12 +154,12 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex
\end{minipage} \end{minipage}
\begin{minipage}{0.5\textwidth} \begin{minipage}{0.5\textwidth}
\vspace{-13mm} \vspace{-13mm}
\includegraphics[width=\textwidth]{password-reuse} \includegraphics[width=\textwidth]{data/password-reuse}
\end{minipage} \end{minipage}
\vfill \vfill
\begin{minipage}{0.3\textwidth} \begin{minipage}{0.3\textwidth}
\includegraphics[width=0.9\textwidth]{../../logos/alug.pdf} \includegraphics[width=0.9\textwidth]{data/alug.pdf}
\end{minipage} \end{minipage}
\begin{minipage}{0.7\textwidth} \begin{minipage}{0.7\textwidth}
\textbf{Egal, ob du Spaß an oder auch Probleme mit deinem Linux hast, komm' zur \alug{} {\small (\alugurl)}!}\\ \textbf{Egal, ob du Spaß an oder auch Probleme mit deinem Linux hast, komm' zur \alug{} {\small (\alugurl)}!}\\
...@@ -199,7 +199,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex ...@@ -199,7 +199,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex
\end{minipage} \end{minipage}
\begin{minipage}{0.5\textwidth} \begin{minipage}{0.5\textwidth}
\centering \centering
\includegraphics[width=.8\textwidth]{eduroam} \includegraphics[width=.8\textwidth]{data/eduroam}
\end{minipage} \end{minipage}
\vspace{-2mm} \vspace{-2mm}
...@@ -214,7 +214,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex ...@@ -214,7 +214,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex
\item Unter \burl{https://videoag.fsmpi.rwth-aachen.de/?course=14ss-kiss} findest du die Aufzeichnung unserer letztjährigen Linux Workshops. Dort geben wir dir einen kleinen Einblick in dein neues Linux. \item Unter \burl{https://videoag.fsmpi.rwth-aachen.de/?course=14ss-kiss} findest du die Aufzeichnung unserer letztjährigen Linux Workshops. Dort geben wir dir einen kleinen Einblick in dein neues Linux.
\begin{center} \begin{center}
\vspace{1em} \vspace{1em}
\begin{overpic}[width=0.6\textwidth]{cautionary.png} \begin{overpic}[width=0.6\textwidth]{data/cautionary.png}
\put(15,4){\burl{https://xkcd.com/456}} \put(15,4){\burl{https://xkcd.com/456}}
\end{overpic} \end{overpic}
\end{center} \end{center}
...@@ -231,7 +231,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex ...@@ -231,7 +231,7 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex
\vfill \vfill
\begin{minipage}{0.3\textwidth} \begin{minipage}{0.3\textwidth}
\includegraphics[width=\textwidth]{../../logos/osak.png} \includegraphics[width=\textwidth]{data/osak.png}
\end{minipage} \end{minipage}
\begin{minipage}{0.7\textwidth} \begin{minipage}{0.7\textwidth}
\textbf{Schreib uns gern an \osakmail{} deine Fragen, dein Feedback oder was du sonst auf dem Herzen hast!}\\ \textbf{Schreib uns gern an \osakmail{} deine Fragen, dein Feedback oder was du sonst auf dem Herzen hast!}\\
...@@ -251,9 +251,9 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex ...@@ -251,9 +251,9 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex
\end{tikzpicture} \end{tikzpicture}
\section*{\laufzettel\hfill \section*{\laufzettel}\hfill
\textbf{Laptop-Modell} \underline{\hspace{4cm}} ~~ \textbf{Laptop-Modell} \underline{ {{ registration.laptop_vendor }} \hspace{2cm}} ~~
\textbf{\lipstick{} Nr.} \underline{\hspace{4cm}}} \textbf{\lipstick{} Nr.} \underline{ {% if cleanhandout %}\hspace{4cm}{% else %}{% for stick in sticks %} {{stick.typ}}/{{stick.number}} {% endfor %} \hspace{2cm} {% endif %}}
\textbf{Dieser Zettel wird nur von Helfern ausgefüllt.} Bitte gib ihn uns bei der Abmeldung zurück. \textbf{Dieser Zettel wird nur von Helfern ausgefüllt.} Bitte gib ihn uns bei der Abmeldung zurück.
\vspace{-1.5em} \vspace{-1.5em}
...@@ -262,8 +262,8 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex ...@@ -262,8 +262,8 @@ Falls gerade kein Helfer verfügbar sein sollte, lies solange den aktuellen \tex
{\renewcommand{\arraystretch}{2} {\renewcommand{\arraystretch}{2}
\begin{center} \begin{center}
\begin{tabular}{r l l | r l l | r l l} \begin{tabular}{r l l | r l l | r l l}
\textit{Architektur} & $\square$ 32 Bit \textbf{only} & $\square$ 64 Bit & \textit{EFI} & $\square$ Ja & $\square$ Nein & \textit{NVidia Optimus} & $\square$ Ja & $\square$ Nein\\\hline \textit{Architektur} & $\square$ 32 Bit \textbf{only} & $\square$ 64 Bit & \textit{EFI} & $\square$ Ja & $\square$ Nein & \textit{NVidia Optimus} & {% if registration.optimus and not cleanhandout %} $\checkmark$ {% else %} $\square$ {% endif %} Ja & {% if not registration.optimus and not cleanhandout %} $\checkmark$ {% else %} $\square$ {% endif %} Nein\\\hline
\textit{Partitionstabelle} & $\square$ GPT & $\square$ MBR & \textit{Dual-Boot} & $\square$ Ja & $\square$ Nein & \textit{\lipnsa{}}\footnote{} & $\square$ Ja & $\square$ Nein \textit{Partitionstabelle} & $\square$ GPT & $\square$ MBR & \textit{Dual-Boot} & {% if registration.dual_boot and not cleanhandout %} $\checkmark$ {% else %} $\square$ {% endif %} Ja & {% if not registration.dual_boot and not cleanhandout %} $\checkmark$ {% else %} $\square$ {% endif %} Nein & \textit{\lipnsa{}}\footnote{} & $\square$ Ja & $\square$ Nein
\end{tabular} \end{tabular}
\footnotetext{\lipnsaexp} \footnotetext{\lipnsaexp}
\end{center} \end{center}
...@@ -309,7 +309,7 @@ $\square$ \large Die Installation wurde komplett \textit{und} erfolgreich abgesc ...@@ -309,7 +309,7 @@ $\square$ \large Die Installation wurde komplett \textit{und} erfolgreich abgesc
\begin{widetable}{\textwidth}{c || l} \begin{widetable}{\textwidth}{c || l}
\textbf{Name} & Probleme, Lösungsversuche, Notizen und sonstige Aktionen \\\hline\hline \textbf{Name} & Probleme, Lösungsversuche, Notizen und sonstige Aktionen \\\hline\hline
\hphantom{Gustav} & ~ \\[2ex]\hline {% if not cleanhandout %} {% if registration.windows8 or not registration.rj45 or not registration.backup %} ~~~ LIPCLMS ~~~ & ~~ {% if registration.windows8 %}Windows $\geq$ 8{% endif %} ~~~~ {% if not registration.rj45 %}Keine RJ45-Schnittstelle{% endif %} ~~~~ {% if not registration.backup %}Kein Backup!{% endif %}\\[2ex]\hline {% else %} \hphantom{Gustav} & ~ \\[2ex]\hline {% endif %} {% else %} \hphantom{Gustav} & ~ \\[2ex]\hline {% endif %}
~ & ~ \hfill \\[2ex]\hline ~ & ~ \hfill \\[2ex]\hline
~ & ~ \hfill \\[2ex]\hline ~ & ~ \hfill \\[2ex]\hline
~ & ~ \hfill \\[2ex]\hline ~ & ~ \hfill \\[2ex]\hline
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment