52 lines
1.8 KiB
Makefile
52 lines
1.8 KiB
Makefile
# makefile / YAML in coursebuilder und pandoc
|
|
|
|
name_course := "Studiengang Verwaltungsinformatik/E-Government (Bachelor of Science)"
|
|
name_author := "Hochschule Schmalkalden, Fakultät Informatik"
|
|
|
|
# settings / intern
|
|
output_path := build
|
|
coursebuilder := ~/Code/coursebuilder/coursebuilder
|
|
pandoc_flags_eisvogel := --filter=pandoc-crossref --highlight-style kate --template eisvogel.latex -V papersize:a4 --resource-path=.
|
|
|
|
mhb_flags := -V titlepage:true -V toc:true -V toc-own-page:true -V table-use-row-colors:true -V date:"\today" -V page-background:"images/background.pdf" -V page-background-opacity:"0.99" -V linestretch:"1.15" -V fontsize:10pt
|
|
|
|
mhb_meta_de := -V lang=de -V title:${name_course} -V subtitle:"Modulhandbuch" -V author:${name_author} -V footer-left:"Nichtamtliche Lesefassung"
|
|
|
|
# targets
|
|
target_mhb := ${output_path}/BaVI.MHB.pdf
|
|
target_so := ${output_path}/BaVI.SO.pdf
|
|
target_po := ${output_path}/BaVI.PO.pdf
|
|
target_nt := ${output_path}/BaVI.Notizen.pdf
|
|
|
|
# target / all
|
|
targets := ${target_mhb} ${target_so} ${target_po} ${target_nt}
|
|
|
|
# sources
|
|
source_po := PO.VI.preamble.md PO.VI.md
|
|
source_so := SO.VI.preamble.md SO.VI.md
|
|
source_nt := notes.md diff.md
|
|
|
|
|
|
# rules ahead
|
|
.PHONY: clean
|
|
|
|
all: ${targets}
|
|
|
|
${target_so}: ${source_so}
|
|
pandoc ${pandoc_flags_eisvogel} -o $@ $^
|
|
|
|
${target_po}: ${source_po}
|
|
pandoc ${pandoc_flags_eisvogel} -o $@ $^
|
|
|
|
${target_nt}: ${source_nt}
|
|
pandoc ${pandoc_flags_eisvogel} -o $@ $^
|
|
|
|
${target_mhb}: MHB/*.yaml
|
|
mkdir -p ${output_path}
|
|
python ${coursebuilder} -s MHB/schema.yaml -p --title "## {}" --legacy -l de -b MHB/book.yaml | pandoc ${pandoc_flags_eisvogel} ${mhb_flags} ${mhb_meta_de} -o $@
|
|
|
|
test-query:
|
|
python ${coursebuilder} -s MHB/schema.yaml -b MHB/book.yaml -q "kind=='compulsory'" -qs min:term -qc form-of-instruction -qf name credits form-of-exam -ql Modulname Kreditpunkte Prüfungsart
|
|
|
|
clean:
|
|
rm ${targets}
|