Add print ready version

This commit is contained in:
cirdeirf 2019-06-10 21:02:04 +02:00
parent 807507d6f0
commit 1af26bd4ab
Signed by: pius
GPG key ID: 130876AF66F40378
6 changed files with 139 additions and 14 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
*.csv
*.pdf
## Core latex/pdflatex auxiliary files:
*.aux

BIN
badge.pdf

Binary file not shown.

View file

@ -1,13 +1,20 @@
\documentclass{scrartcl}
\usepackage[left=1.9cm, right=2.75cm, top=0cm, bottom=0cm]{geometry}
\usepackage[paperwidth=9cm,
paperheight=13cm,
left=5.5mm,
right=13.0mm,
top=0cm,
bottom=0cm]{geometry}
\pagestyle{empty}
\usepackage{background}
\backgroundsetup{scale = 1.0, angle = 0, opacity = 1.0,%
contents = {\includegraphics[width = \paperwidth, height = \paperheight,
keepaspectratio] {templates/Badge_Kiffel.pdf}}}%
keepaspectratio] {templates/Badge_Helfer.pdf}}}%
\usepackage{qrcode}
\usepackage{ifthen}
\usepackage{lastpage}
\usepackage{xcolor}
\definecolor{helfer} {rgb}{0.69, 0.88, 0.11} % #B1E11C (grün)
@ -197,7 +204,7 @@
\begin{document}
\newread\file%
\openin\file=list_kiffel.csv
\openin\file=list_helfer_impr.csv
\loop%
\read\file%
@ -207,24 +214,36 @@
\else
\expandafter\chopline\line\\
\vspace*{4.5cm}
\ifthenelse{\equal{\thepage}{1}} {
\vspace*{11.55mm}
}{
\vspace*{16mm}
}
\begin{minipage}[t][][c]{\textwidth}
\begin{fitbox}{\textwidth}{.075\textheight}
\centering
\ifthenelse{\equal{\name}{\#\#\#}}{
\phantom{\textbf{Matthias Stuhlbein}}
}{
\textbf{\name}%
}
\end{fitbox}
\end{minipage}
\vspace*{.75cm}
\vspace*{4mm}
\begin{minipage}[t][][c]{\textwidth}
\begin{fitbox}{\textwidth}{.042\textheight}
\centering
\ifthenelse{\equal{\uni}{\#\#\#}}{
\phantom{\textbf{TU Dresden}}
}{
\uni%
}
\end{fitbox}
\end{minipage}
\vspace{7.30cm}
\qrcode[height=54.831mm]{\kdvCode}
\vspace{32mm}
\qrcode[height=24mm]{\kdvCode}
\pagebreak

View file

@ -1,9 +1,50 @@
% pdfLaTeX, I guess
\documentclass{article}
\usepackage[a4paper,nohead,nofoot,margin=0mm]{geometry}
\documentclass{scrartcl}
\usepackage[nohead,nofoot,margin=0mm]{geometry}
\usepackage{pdfpages}
\usepackage{background}
\backgroundsetup{scale = 1.0,angle = 0, opacity = 1.0,%
contents = {\includegraphics[width = \paperwidth, height = \paperheight,
keepaspectratio]{foldmarks.pdf}}}%
% % for foldmarks
% \usepackage{tikz}
% \usetikzlibrary{calc, backgrounds}
% \hoffset=-3.9mm
\begin{document}
\includepdf[pages=-,nup=2x5,delta=0mm 0mm,noautoscale=true,frame=false]{namensschild.pdf}
\includepdf[height=13cm,
width=9cm,
pages=-,
nup=2x2,
delta=10mm 10mm,
noautoscale=false,
frame=false]{badge.pdf}
% % foldmarks
% \begin{tikzpicture}
% \begin{scope}[on background layer]
% \draw ( 0mm, 0mm)--++(0mm, 0mm);
% \draw ( 10mm, 0mm)--++( 0mm, -10.5mm);
% \draw (100mm, 0mm)--++( 0mm, -10.5mm);
% \draw (110mm, 0mm)--++( 0mm, -10.5mm);
% \draw (200mm, 0mm)--++( 0mm, -10.5mm);
% \draw (210mm, - 13.5mm)--++(-7mm, 0mm);
% \draw (210mm, -143.5mm)--++(-7mm, 0mm);
% \draw (210mm, -153.5mm)--++(-7mm, 0mm);
% \draw (210mm, -283.5mm)--++(-7mm, 0mm);
% \draw (200mm, -297.0mm)--++( 0mm, 10.5mm);
% \draw (110mm, -297.0mm)--++( 0mm, 10.5mm);
% \draw (100mm, -297.0mm)--++( 0mm, 10.5mm);
% \draw ( 10mm, -297.0mm)--++( 0mm, 10.5mm);
% \draw ( 0mm, -283.5mm)--++( 7mm, 0mm);
% \draw ( 0mm, -153.5mm)--++( 7mm, 0mm);
% \draw ( 0mm, -143.5mm)--++( 7mm, 0mm);
% \draw ( 0mm, - 13.5mm)--++( 7mm, 0mm);
% \end{scope}
% \end{tikzpicture}
\end{document}

20
empty_badges.txt Normal file
View file

@ -0,0 +1,20 @@
3889744831
2060815223
2870887596
9942826716
8147090964
3689932700
4788964330
2998912377
1701827862
7426068925
4784224602
5719312188
7173459290
1941379358
8306879159
3062530934
3427708822
6569714123
8152759092
9002159860

44
list_reorder.py Normal file
View file

@ -0,0 +1,44 @@
from os import remove
import sys
def chunk(thelist, chunksize):
# do chunking
ret = list()
for i in range(0,len(thelist),chunksize):
ret.append(thelist[i:i+chunksize])
return ret
def filetolist(path):
lines = list()
with open(path) as f:
line = f.readline()
while line:
lines.append(line)
line = f.readline()
return lines
def main():
if len(sys.argv) < 4:
print("error")
lines = filetolist(sys.argv[1])
secrets = filetolist(sys.argv[3])
# lines = ["\#\#\#\#\#,{},\#\#\#\#\#\n".format(secrets.pop(0)[0:-2])] + lines
# add padding
chunksize = 4
for _ in range((chunksize - len(lines) % chunksize) % chunksize):
lines.append("\#\#\#,{},\#\#\#\n".format(secrets.pop(0)[0:-2]))
ret = list()
for c in chunk(lines, chunksize):
ret.append(c)
ret.append([c[1], c[0], c[3], c[2]])
with open(sys.argv[2],'w+') as f:
for c in ret:
for l in c:
f.write(l)
return
with open(sys.argv[3],'w+') as f:
for s in secrets:
f.write(s)
if __name__ == '__main__':
main()