-
Notifications
You must be signed in to change notification settings - Fork 0
/
genslides.py
52 lines (43 loc) · 1.89 KB
/
genslides.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import subprocess
from pathlib import Path
from jinja2 import Environment
TALKS: list[tuple[str, str, str | None]] = [
("Dominik Gresch", "Better Autocomplete with Type Hints", "better_autocomplete_with_type_hints.pdf"),
("Simon Niederberger", r"Jupyter \& Git", "presentation.pdf"),
("Vita Midori", "ML at Demokratis.ch", "Vita Midori - ML at Demokratis.pdf"),
("Tim Head", "Zero Code Change Acceleration", 'Lightning - Zero Code Change.pptx.pdf'),
# wait list (except last)
("Josua Schmid", "Funny Slides for Data Scientist", "2024-10-18 Funny Slides for Data Scientists.pdf"),
("Ricardo Pereira", "Python Superset", "PythonSuperset.pdf"),
("Stefan Keller", "Pythons and Ducks!", "Lightning_Talk_Stefan_Keller_Pythons_and_Ducks.pdf"),
("Tamara Reuveni Mazig", "Topic Modelling for Customer experience", "Lightning Talk Tamara Reuveni Mazig.pdf"),
("Jan Werth", r"AI \& our Brain $\rightarrow$ not quite there yet", None), # FIXME
("Florian Bruhin", "fstring.help", "fstring-help.pdf"),
("Florian Bruhin", "A .py/.tex/.pdf quine", None),
]
def main() -> None:
talks: list[tuple[str, str, str | None, str]] = [
(speaker, title, pdf, next_speaker)
for (speaker, title, pdf), (next_speaker, _, _)
in zip(TALKS, TALKS[1:] + [("", "", None)])
]
env = Environment(
variable_start_string="((",
variable_end_string="))",
block_start_string="((*",
block_end_string="*))",
comment_start_string="((=",
comment_end_string="=))",
autoescape=False,
)
j2_src = Path("genslides.tex.j2").read_text()
template = env.from_string(j2_src)
tex_src = template.render(entries=talks)
tex_path = Path("talks.tex")
tex_path.write_text(tex_src)
subprocess.run(
["latexmk", "-pdf", "-shell-escape", tex_path],
check=True,
)
if __name__ == "__main__":
main()