diff --git a/2024-03-06_heise-devsec-Dependency-Updates.yaml b/2024-03-06_heise-devsec-Dependency-Updates.yaml index ba18636b..567ed8ae 100644 --- a/2024-03-06_heise-devsec-Dependency-Updates.yaml +++ b/2024-03-06_heise-devsec-Dependency-Updates.yaml @@ -17,13 +17,13 @@ slides: summary: - icon: link text: Ops and Devs require many dependencies -- icons: lock-keyhole +- icon: lock-keyhole text: Dependencies introduce (additional) security issues -- icons: arrows-rotate +- icon: arrows-rotate text: Automated updates help stay on top -- icons: crosshairs +- icon: crosshairs text: Automerging takes the load off dev and ops... -- icons: magnifying-glass-chart +- icon: magnifying-glass-chart text: ...but requires thorough testing events: diff --git a/Makefile b/Makefile index 9db01f6f..f82a8f8b 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,9 @@ clean-all: echo "Generating $$(basename $@)"; \ include $* -%.html: template.html %.yaml +SOURCES=$(shell find . -maxdepth 1 -name \*.yaml -printf '%P\n' | xargs -I{} basename {} .yaml) + +$(addsuffix .html,$(SOURCES)):%.html: Makefile template.html %.yaml @\ TITLE="$$(yq eval '.metadata.title' $*.yaml)"; \ SUBTITLE="$$(yq eval '.metadata.subtitle' $*.yaml)"; \ @@ -46,11 +48,34 @@ clean-all: | xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -u "/x:html/x:body//x:section[@id='title']//x:a" -v "$${EVENT}" \ | xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -u "/x:html/x:body//x:section[@id='title']//x:a/@href" -v "$${LINK}" \ | xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -u "/x:html/x:body//x:section[@id='title']//x:img/@src" -v "$${LOGO}" \ - | xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -a "/x:html/x:body//x:section[@id='title']" -t elem -n section \ - | xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -a "/x:html/x:body//x:section[not(@id)]" -t attr -n id -v "FOO" \ - | xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -a "/x:html/x:body//x:section[@id='FOO']" -t attr -n data-separator -v "^---$$" \ - | xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -a "/x:html/x:body//x:section[@id='FOO']" -t attr -n data-separator-vertical -v "^--$$" \ - >$@ + >$@; \ + yq eval '.slides[]' $*.yaml \ + | while read -r FILE; do \ + xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \ + --insert '/x:html/x:body//x:section[@id="summary"]' --type elem --name section \ + --append '/x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-markdown --value "$${FILE}" \ + --append '/x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-separator --value "^---$$" \ + --append '/x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-vertical-separator --value "^--$$" \ + --insert '/x:html/x:body//x:section[@id="summary"]' --type text --name "" --value $$'\n' \ + $@; \ + done; \ + xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \ + --insert '/x:html/x:body//x:section[@id="summary"]' --type text --name "" --value $$'\n' \ + $@; \ + yq eval '.summary[] | "
  • " + .text + ")
  • "' $*.yaml \ + | while read -r LINE; do \ + xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \ + --subnode '/x:html/x:body//x:section[@id="summary"]/x:ul[@id="bullets"]' --type text --name "" --value "$${LINE}" \ + --subnode '/x:html/x:body//x:section[@id="summary"]/x:ul[@id="bullets"]' --type text --name "" --value $$'\n' \ + $@; \ + done; \ + yq eval '.events | reverse | .[] | .date + "" + .name + ": " + .title + ""' $*.yaml \ + | while read -r LINE; do \ + xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \ + --append '/x:html/x:body//x:section[@id="summary"]/x:h3[@id="events"]' --type text --name "" --value "$${LINE}" \ + --append '/x:html/x:body//x:section[@id="summary"]/x:h3[@id="events"]' --type text --name "" --value $$'\n' \ + $@; \ + done .PHONY: web-$(COMMIT): diff --git a/template.html b/template.html index e2ee6a89..84a52ec1 100644 --- a/template.html +++ b/template.html @@ -56,8 +56,6 @@

    Summary

    Upcoming events