Added concat full lecture handout generator

This commit is contained in:
Michael Chen 2022-06-15 22:03:46 +02:00
parent 37750c2395
commit 4cb6095c92
No known key found for this signature in database
GPG Key ID: 1CBC7AA5671437BB
2 changed files with 9 additions and 0 deletions

1
Lecture notes/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
handout.pdf

8
Lecture notes/build.py Normal file
View File

@ -0,0 +1,8 @@
import os
import pathlib
from glob import glob
import subprocess
files = dict(sorted((int(file.name[4:-12]), file) for file in pathlib.Path('.').rglob('week*-handout.pdf')))
fileList = map(lambda x: f'\"{str(x)}\"', files.values())
command = f"pdftk {' '.join(fileList)} cat output handout.pdf"
subprocess.run(command)