Inicjalizacja repo: plan książki, spis treści, rozdziały, notatki, instrukcje
This commit is contained in:
49
Justfile
Normal file
49
Justfile
Normal file
@@ -0,0 +1,49 @@
|
||||
# Veritaryzm - generowanie książki PDF
|
||||
|
||||
src := "src"
|
||||
output := "Veritaryzm.pdf"
|
||||
metadata := "metadata.yaml"
|
||||
template := "pandoc-template.tex"
|
||||
chapters := "00_wprowadzenie 01_źródła_inspiracji 02_fundamenty_veritaryzmu 03_estetyka_i_rytuał 04_kodeks_etyczny 05_decyzyjność 06_etos_synergii 07_edukacja 08_inicjacja 09_dni_doświadczania 10_opieka_i_wsparcie 11_architektura 12_symbolika_i_ubior 13_ai_w_veritaryzmie 14_system_eos 15_wielka_debata 16_dyplomacja_ai 17_zasady_egzosferyczne 18_mapa_uczestnictwa 19_kalkulator_synergii 20_generacja_v 21_księga_luster 22_przewodnik_dla_początkujących 23_manifest 24_proklamacja"
|
||||
|
||||
# Generuje PDF z całej książki i otwiera podgląd
|
||||
pdf:
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
export PATH="/Library/TeX/texbin:$PATH"
|
||||
files=()
|
||||
for c in {{chapters}}; do files+=("{{src}}/${c}.md"); done
|
||||
pandoc "${files[@]}" -o {{output}} --standalone --from markdown+yaml_metadata_block \
|
||||
--pdf-engine=xelatex --metadata-file {{metadata}} -H {{template}}
|
||||
echo "OK: {{output}}"
|
||||
open {{output}}
|
||||
|
||||
# Testuje pandoc-template.tex (generuje .tex bez PDF - do weryfikacji zmian w szablonie)
|
||||
check-template:
|
||||
pandoc {{src}}/00_wprowadzenie.md -o _test_template.tex --standalone --metadata-file {{metadata}} -H {{template}} -t latex
|
||||
echo "OK: _test_template.tex (sprawdź, usuń: rm _test_template.tex)"
|
||||
|
||||
# Usuwa wygenerowane pliki (PDF, .tex, .aux, .log, .toc)
|
||||
clean:
|
||||
rm -f {{output}} Veritaryzm.tex _test_template.tex *.aux *.log *.toc
|
||||
echo "Wyczyszczono."
|
||||
|
||||
# Sprawdza pandoc, TeX, gpg; instaluje brakujące pakiety LaTeX (wymaga sudo)
|
||||
setup-deps:
|
||||
#!/usr/bin/env bash
|
||||
export PATH="/Library/TeX/texbin:$PATH"
|
||||
err=0
|
||||
command -v pandoc &>/dev/null || { echo "Brak pandoc: brew install pandoc"; err=1; }
|
||||
command -v xelatex &>/dev/null || command -v lualatex &>/dev/null || { echo "Brak TeX: brew install basictex"; err=1; }
|
||||
command -v gpg &>/dev/null || { echo "Brak gpg: brew install gnupg"; err=1; }
|
||||
[ $err -eq 1 ] && exit 1
|
||||
missing=""
|
||||
for pkg in tocloft fontspec selnolig; do
|
||||
tlmgr list --only-installed 2>/dev/null | grep -q "$pkg" || missing="$missing $pkg"
|
||||
done
|
||||
if [ -n "$missing" ]; then
|
||||
echo "Instaluję pakiety LaTeX:$missing"
|
||||
sudo tlmgr install $missing
|
||||
else
|
||||
echo "Wszystkie zależności OK."
|
||||
fi
|
||||
Reference in New Issue
Block a user