2024-04-21 22:07:57 +00:00
|
|
|
pdf_filename := 'slides.pdf'
|
|
|
|
thumbnail_filename := 'thumbnail.jpg'
|
|
|
|
|
2024-05-10 09:04:53 +00:00
|
|
|
_default:
|
2024-04-21 22:07:57 +00:00
|
|
|
@just --list
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -fr dist/*
|
|
|
|
touch dist/.keep
|
|
|
|
|
|
|
|
find . \
|
|
|
|
-type f \( -name "{{ pdf_filename }}" -o -name *.build_temp -o -name {{ thumbnail_filename }} \) \
|
|
|
|
-delete
|
|
|
|
|
2024-05-09 14:16:39 +00:00
|
|
|
generate talk_path filename="slides.rst": (generate-pdf talk_path filename)
|
2024-04-21 22:07:57 +00:00
|
|
|
|
2024-05-09 14:16:39 +00:00
|
|
|
generate-pdf talk_path filename="slides.rst":
|
2024-05-09 10:06:40 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
|
|
|
|
talk_slug=$(basename {{ talk_path }})
|
|
|
|
|
|
|
|
pushd "{{ talk_path }}"
|
|
|
|
|
2024-05-09 14:16:39 +00:00
|
|
|
rst2pdf {{ filename }} \
|
2024-04-21 22:07:57 +00:00
|
|
|
--break-level 1 \
|
|
|
|
-e preprocess \
|
|
|
|
--fit-background-mode scale \
|
|
|
|
--font-path ../fonts \
|
2024-05-09 10:06:40 +00:00
|
|
|
--output "../../dist/${talk_slug}.pdf" \
|
2024-05-09 12:57:30 +00:00
|
|
|
--stylesheets opdavies-light,igor \
|
2024-05-09 09:45:06 +00:00
|
|
|
--stylesheet-path ../styles
|
2024-04-21 22:07:57 +00:00
|
|
|
|
2024-05-09 10:06:40 +00:00
|
|
|
popd
|
2024-04-21 22:07:57 +00:00
|
|
|
|
2024-05-09 10:06:40 +00:00
|
|
|
tree dist
|
2024-05-10 09:04:53 +00:00
|
|
|
|
|
|
|
present slides_path duration *args:
|
|
|
|
pdfpc {{ slides_path }} --duration={{ duration }} {{ args }}
|
|
|
|
|
|
|
|
watch slides_path rst_file="slides.rst":
|
|
|
|
find justfile src/styles {{ slides_path }} -type f | \
|
|
|
|
entr just generate-pdf {{ slides_path }} {{ rst_file }}
|