Commit 083b800f authored by PizZaKatZe's avatar PizZaKatZe

Add CmS logo

parent 285447e6
include jht_flyergen/cms-logo.png
include jht_flyergen/template.tex
......@@ -43,10 +43,11 @@ def fetch_data(url: str) -> List[Dict]:
def generate_flyer(sessions: List[Dict], homeurl: str, links=True) -> bytes:
"""Generates a PDF from self-organized session data.
"""
env = make_env(loader=FileSystemLoader(dirname(__file__)))
libpath = dirname(__file__)
env = make_env(loader=FileSystemLoader(libpath))
template = env.get_template('template.tex')
pdf = build_pdf(template.render(sessions=sessions, homeurl=homeurl, links=links))
return pdf.__bytes__()
tex = template.render(libpath=libpath, sessions=sessions, homeurl=homeurl, links=links)
return tex
def process_sessions(sessions: List[Dict], day: int) -> List[Dict]:
"""Filters out irrelevant sessions and sanitizes session data.
......
......@@ -5,9 +5,12 @@
\usepackage{hyperref}
\usepackage{longtable}
\usepackage{qrcode}
\usepackage{graphicx}
\graphicspath{{\VAR{libpath}/}}
\setlength{\parindent}{0pt}
\setcounter{secnumdepth}{0}
\pagestyle{empty}
\newcommand{\thetitle}{Angebote für Junghacker*innen}
\newcommand{\theauthor}{Chaos macht Schule}
......@@ -21,8 +24,10 @@
}
\begin{document}
\maketitle
\thispagestyle{empty}
\raisebox{3em}{\textbf{\Large \thetitle}}
\hfill
\includegraphics[height=7em]{cms-logo.png}
\\[-1ex]
%- if links
\begin{longtable}{|l|p{0.45\linewidth}|p{0.2\linewidth}|l|}
......@@ -49,8 +54,9 @@
%- endif
%- if homeurl
\vfill
Weitere Informationen: \qquad \url{\VAR{homeurl}} \hfill \qrcode{\VAR{homeurl}}
\vfill\hfill
\parbox{12em}{Weitere Informationen: \\ \url{\VAR{homeurl}}}
\parbox{6em}{\qrcode{\VAR{homeurl}}}
%- endif
\end{document}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment