diff --git a/Lecture notes/.gitignore b/Lecture notes/.gitignore new file mode 100644 index 0000000..c4f4e03 --- /dev/null +++ b/Lecture notes/.gitignore @@ -0,0 +1 @@ +handout.pdf diff --git a/Lecture notes/build.py b/Lecture notes/build.py new file mode 100644 index 0000000..20a35a7 --- /dev/null +++ b/Lecture notes/build.py @@ -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) \ No newline at end of file