Compare commits

..

6 Commits

Author SHA1 Message Date
Dominic Zimmer
966d96f643 Apply Jan's feedback 2022-08-27 01:23:23 +02:00
Dominic Zimmer
985f933859 Mix easy and hard prompts 2022-08-26 12:44:52 +02:00
Dominic Zimmer
3bb036b7c5 Revert prompt styling, make Bingo cells bigger 2022-08-26 12:44:00 +02:00
Dominic Zimmer
2104d7008c Fix nitpick 2022-08-26 11:56:25 +02:00
Dominic Zimmer
15164a1040 Update prompts, Play around with font sizes 2022-08-26 11:49:56 +02:00
Dominic Zimmer
7cc0fa5e84 Add name field 2022-08-26 11:48:24 +02:00
3 changed files with 19 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ with open("prompts.txt") as f:
stripped = "".join(raw_sentences).strip().split("\n")
sentences["easy"] = [ line for line in stripped if "*" not in line ]
sentences["hard"] = [ line.replace("*","") for line in stripped if "*" in line ]
sentences["all"] = [ line.replace("*","") for line in stripped ]
print(f"[INFO] Found {len(sentences['easy'])} easy prompts")
print(f"[INFO] Found {len(sentences['hard'])} hard prompts")
@@ -21,9 +22,9 @@ print(f"[INFO] Found {len(sentences['hard'])} hard prompts")
""" Postprocess the content string to look nice in the latex tabular cell """
def make_cell(content: str):
return fr"""\vspace{{0.5cm}}
\rule{{3cm}}{{0.15mm}} \, \newline \small {content}
\vspace{{0.5cm}}"""
#new, oben mehr space, Strich länger und \small removed
return fr"""\vspace{{1cm}} \rule{{4.5cm}}{{0.15mm}} \, \vspace{{.3cm}} \newline {content} \vspace{{0.5cm}}"""
def substitute_texts(text: str, substitutions: list[str]):
return reduce( \
@@ -39,7 +40,8 @@ def gen_board(num: int = 1):
print(f"Generating {num} boards")
for i in range(1, num+1):
prompts = [ *random.sample(sentences["easy"], num_easy), *random.sample(sentences["hard"], num_hard) ]
#prompts = [ *random.sample(sentences["easy"], num_easy), *random.sample(sentences["hard"], num_hard) ]
prompts = [ *random.sample(sentences["all"], num_total) ]
random.shuffle(prompts)
pick = substitute_texts(latex_template, prompts)
@@ -48,5 +50,5 @@ def gen_board(num: int = 1):
with open(output_dir + filename,"w") as f:
f.writelines(pick)
gen_board(40)
gen_board(8)
print("Done!")

View File

@@ -6,7 +6,7 @@ kann Schach spielen
konnte \newline $\int\limits_{5}^{8} (2x + 1) \text{dx} = \quad $ \newline ausrechnen*
hat einen Namen mit weniger als 5 Buchstaben
reiste weiter als 100km an
(hat) studiert, aber nicht Informatik oder Computerlinguistik*
studiert(e), aber nicht Informatik oder Computerlinguistik*
hat keine Geschwister
ist single
konnte drei Star Wars Charaktere nennen
@@ -33,7 +33,7 @@ konnte vor meinen Augen einen Zauberwürfel lösen*
war schonmal in der Natur klettern*
hatte dieses Jahr Corona :-(
kann 5km unter 30 Minuten laufen
identifiziert sich als Ravenclaw (Harry Potter Haus)*
identifiziert sich als Ravenclaw {\footnotesize(Harry Potter Haus)}*
mag Katzen mehr als Hunde
kann Stricken
hat schonmal ein Buch von Mark-Uwe Kling gelesen
@@ -47,3 +47,5 @@ war schonmal auf Mallorca
hat mal in einer WG gewohnt
war schonmal in der Zeitung*
hat schonmal in einem Theaterstück mitgespielt*
hat bereits drei Kontinente bereist*
hat im August Geburtstag

View File

@@ -8,22 +8,24 @@ latex_template=r"""
\usepackage{eurosym}
\begin{document}
\setlength\tabcolsep{1cm}
\setlength{\tabcolsep}{20pt}
\hspace{0pt}
\vfill
\large %added
{\hfill Dein Name: \rule{3.5cm}{.15mm}} % \small removed, Strich verlängert von 2.5 zu 3.5
\vspace{-.65cm}
\begin{center}
{\Huge Hochzeits-Bingo}
\vspace{0.2cm}
Trage in jedem Feld den Namen einer Person ein, die die genannte Eigenschaft erfüllt.
Jede Person darf nur \\ einmal eingetragen werden.
Für jedes vollständig ausgefüllte Bingo das bei Dominic oder Jan abgegeben wird \\ bekommt das Brautpaar 2 \euro.
Jede Person darf \\ höchstens einmal eingetragen werden.
Für jedes vollständig (9 Felder) ausgefüllte Bingo, das bei \\ Dominic oder Jan abgegeben wird, bekommt das Brautpaar 2 \euro.
\vfill
\resizebox{15cm}{!}{
% \begin{tabular}{|m{4cm}|m{4cm}|m{4cm}|}
\begin{tabular}{| >{\centering\arraybackslash}m{1in} | >{\centering\arraybackslash}m{1in} | >{\centering\arraybackslash}m{1in} |}
\begin{tabular}{| >{\centering\arraybackslash}m{5cm} | >{\centering\arraybackslash}m{5cm} | >{\centering\arraybackslash}m{5cm} |}
\hline \centering
[[text0]]
& \centering
@@ -47,7 +49,6 @@ Für jedes vollständig ausgefüllte Bingo das bei Dominic oder Jan abgegeben wi
\\
\hline
\end{tabular}
}
\end{center}