Add justfile
This commit is contained in:
parent
72118c1903
commit
d3c7984925
30
justfile
Normal file
30
justfile
Normal file
|
@ -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"
|
Loading…
Reference in a new issue