-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathbuild-pdf
More file actions
executable file
·41 lines (33 loc) · 856 Bytes
/
build-pdf
File metadata and controls
executable file
·41 lines (33 loc) · 856 Bytes
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
#!/usr/bin/env python
"""
Parallel build of the PDF slide decks
"""
# Python Standard Library
import shlex
import subprocess
import sys
def sh(cmd):
return subprocess.Popen(shlex.split(cmd))
targets = [
"intro",
"models",
"simulation",
"well-posedness",
"asymptotic",
"LTI-models",
"internal-dynamics",
"IO-dynamics",
"controllability",
"asymptotic-stabilization",
"optimal-control",
"observers",
]
# # Should have been taken care of by the pixi activation script
# if sh("which decktape").wait() != 0:
# sh("npm install -g decktape").wait()
processes = []
for target in targets:
cmd = f"decktape --chrome-arg=--no-sandbox --size 1600x900 automatic {target}.html {target}.pdf"
process = sh(cmd)
processes.append(process)
sys.exit(0 if all(p.wait() == 0 for p in processes) else 1)