Commit 9a976c64 authored by Mathias Rav's avatar Mathias Rav
Browse files

Convert to JSON + Python

parent 58148e7e
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 311}
\newcommand{\personA}{}
\newcommand{\titleA}{}
\newcommand{\picA}{}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 316}
\newcommand{\personA}{Dorthe Haagen Nielsen}
\newcommand{\titleA}{Research Group Coordinator, MA}
\newcommand{\picA}{\includegraphics[height=\picheight]{headshots/dorthe.jpg}}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
%\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
%\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 318}
\newcommand{\personA}{}
\newcommand{\titleA}{}
\newcommand{\picA}{}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 319}
\newcommand{\personA}{Kasper Green Larsen}
\newcommand{\titleA}{Associate Professor\\On sabbatical at UC Berkeley until 2019}
\newcommand{\picA}{\includegraphics[height=\picheight]{headshots/larsen.jpg}}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 322}
\newcommand{\personA}{Guest office}
\newcommand{\titleA}{}
\newcommand{\picA}{}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 324}
\newcommand{\personA}{Lior Kamma}
\newcommand{\titleA}{Postdoc}
\newcommand{\picA}{\includegraphics[height=\picheight]{headshots/lior.jpg}}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 326}
\newcommand{\personA}{Casper Freksen}
\newcommand{\titleA}{PhD student}
\newcommand{\picA}{\includegraphics[height=\picheight]{headshots/freksen.jpg}}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{Svend Christian Svendsen}
\newcommand{\titleB}{PhD student}
\newcommand{\picB}{\includegraphics[height=\picheight]{headshots/svend.jpg}}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 333}
\newcommand{\personA}{Guest office}
\newcommand{\titleA}{}
\newcommand{\picA}{}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 334}
\newcommand{\personA}{Asger Drewsen}
\newcommand{\titleA}{PhD student}
\newcommand{\picA}{\includegraphics[height=\picheight]{headshots/asger.jpg}}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 336}
\newcommand{\personA}{Konstantinos Mampentzidis}
\newcommand{\titleA}{PhD student}
\newcommand{\picA}{\includegraphics[height=\picheight]{headshots/kostas.jpg}}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{Rasmus Killmann}
\newcommand{\titleB}{PhD student}
\newcommand{\picB}{\includegraphics[height=\picheight]{headshots/rasmus.jpg}}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 337}
\newcommand{\personA}{Guest office}
\newcommand{\titleA}{}
\newcommand{\picA}{}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 392}
\newcommand{\personA}{}
\newcommand{\titleA}{}
\newcommand{\picA}{}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 393}
\newcommand{\personA}{durham}
\newcommand{\titleA}{}
\newcommand{\picA}{\includegraphics[height=\picheight]{headshots/durham.jpg}}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{Huge Mess}
\newcommand{\titleB}{}
\newcommand{\picB}{\includegraphics[height=\picheight]{headshots/mess.jpg}}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
\documentclass[a4paper]{memoir}
% ------------------------------------------------------------
% Sign data
\newcommand{\roomname}{Nygaard 397}
\newcommand{\personA}{}
\newcommand{\titleA}{}
\newcommand{\picA}{}
% If \personB is empty, only \personA is printed in the center
\newcommand{\personB}{}
\newcommand{\titleB}{}
\newcommand{\picB}{}
% ------------------------------------------------------------
% Header
\newcommand{\deptname}{Department of Computer Science}
\newcommand{\university}{%
\smash{\rlap{\raisebox{2em}{\aupeto\fontsize{30pt}{30pt}\selectfont AU}}}%
AARHUS UNIVERSITY%
}
% ------------------------------------------------------------
% Footer
\newcommand{\bottomleftlogo}{%
%\includegraphics[width=3cm]{logos/dnrf.pdf}%
}
\newcommand{\bottomrightlogo}{%
%\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}%
}
% ------------------------------------------------------------
\input{signbody}
{
"Nygaard 311": "madalgo",
"Nygaard 316": [
"dept",
["Dorthe Haagen Nielsen", "Research Group Coordinator, MA", "dorthe.jpg"]
],
"Nygaard 318": "madalgo",
"Nygaard 319": [
"madalgo",
["Kasper Green Larsen", "Associate Professor\nOn sabbatical at UC Berkeley until 2019", "larsen.jpg"]
],
"Nygaard 322": "madalgo_guest",
"Nygaard 324": [
"madalgo",
["Lior Kamma", "Postdoc", "lior.jpg"]
],
"Nygaard 326": [
"madalgo",
["Casper Freksen", "PhD student", "freksen.jpg"],
["Svend Christian Svendsen", "PhD student", "svend.jpg"]
],
"Nygaard 333": "madalgo_guest",
"Nygaard 334": [
"madalgo",
["Asger Drewsen", "PhD student", "asger.jpg"]
],
"Nygaard 336": [
"madalgo",
["Konstantinos Mampentzidis", "PhD student", "kostas.jpg"],
["Rasmus Killmann", "PhD student", "rasmus.jpg"]
],
"Nygaard 337": "madalgo_guest",
"Nygaard 392": "madalgo",
"Nygaard 393": [
"madalgo",
["durham", "", "durham.jpg"],
["Huge Mess", "", "mess.jpg"]
],
"Nygaard 397": "dept"
}
import argparse
import json
import re
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("command", choices=("compile", "print"))
parser.add_argument("sign")
DEPT_NAME = "Department of Computer Science"
UNIVERSITY = "\\smash{\\rlap{\\raisebox{2em}{\\aupeto\\fontsize{30pt}{30pt}\\selectfont AU}}}AARHUS UNIVERSITY"
DNRF_LOGO = "\\includegraphics[width=3cm]{logos/dnrf.pdf}"
MADALGO_LOGO = "\\includegraphics[width=13cm]{logos/MadalgoLogo.pdf}"
class Signs:
@staticmethod
def sign(
roomname,
personA="",
titleA="",
picA="",
personB="",
titleB="",
picB="",
deptname=DEPT_NAME,
university=UNIVERSITY,
bottomleftlogo=DNRF_LOGO,
bottomrightlogo=MADALGO_LOGO,
):
context = [
("roomname", roomname),
("personA", personA),
("titleA", titleA),
("picA", picA),
("personB", personB),
("titleB", titleB),
("picB", picB),
("deptname", deptname),
("university", university),
("bottomleftlogo", bottomleftlogo),
("bottomrightlogo", bottomrightlogo),
]
commands = [
"\\documentclass[a4paper]{memoir}\n",