diff --git a/justfile b/justfile new file mode 100644 index 0000000..5b569fa --- /dev/null +++ b/justfile @@ -0,0 +1,30 @@ +pdf_filename := 'slides.pdf' +rst_filename := 'slides.rst' +thumbnail_filename := 'thumbnail.jpg' + +default: + @just --list + +clean: + rm -fr dist/* + touch dist/.keep + + find . \ + -type f \( -name "{{ pdf_filename }}" -o -name *.build_temp -o -name {{ thumbnail_filename }} \) \ + -delete + +generate name: (generate-pdf name) + +generate-pdf name: + cd src/{{ name }} && rst2pdf {{ rst_filename }} \ + --break-level 1 \ + -e preprocess \ + --fit-background-mode scale \ + --font-path ../fonts \ + --output ../../dist/{{ name }}.pdf \ + --stylesheets ./opdavies-light,tango + + tree dist + +present name: + pdfpc "dist/{{ name }}.pdf"