Skip to content

Commit f22add1

Browse files
committed
Close to completion
1 parent 5195593 commit f22add1

File tree

3 files changed

+35
-12
lines changed

3 files changed

+35
-12
lines changed

2024-03-06_heise-devsec-Dependency-Updates.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ slides:
1717
summary:
1818
- icon: link
1919
text: Ops and Devs require many dependencies
20-
- icons: lock-keyhole
20+
- icon: lock-keyhole
2121
text: Dependencies introduce (additional) security issues
22-
- icons: arrows-rotate
22+
- icon: arrows-rotate
2323
text: Automated updates help stay on top
24-
- icons: crosshairs
24+
- icon: crosshairs
2525
text: Automerging takes the load off dev and ops...
26-
- icons: magnifying-glass-chart
26+
- icon: magnifying-glass-chart
2727
text: ...but requires thorough testing
2828

2929
events:

Makefile

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ clean-all:
2828
echo "Generating $$(basename $@)"; \
2929
include $*
3030

31-
%.html: template.html %.yaml
31+
SOURCES=$(shell find . -maxdepth 1 -name \*.yaml -printf '%P\n' | xargs -I{} basename {} .yaml)
32+
33+
$(addsuffix .html,$(SOURCES)):%.html: Makefile template.html %.yaml
3234
@\
3335
TITLE="$$(yq eval '.metadata.title' $*.yaml)"; \
3436
SUBTITLE="$$(yq eval '.metadata.subtitle' $*.yaml)"; \
@@ -46,11 +48,34 @@ clean-all:
4648
| xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -u "/x:html/x:body//x:section[@id='title']//x:a" -v "$${EVENT}" \
4749
| 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}" \
4850
| 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}" \
49-
| xmlstarlet ed -P -N x="http://www.w3.org/1999/xhtml" -a "/x:html/x:body//x:section[@id='title']" -t elem -n section \
50-
| 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" \
51-
| 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 "^---$$" \
52-
| 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 "^--$$" \
53-
>$@
51+
>$@; \
52+
yq eval '.slides[]' $*.yaml \
53+
| while read -r FILE; do \
54+
xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \
55+
--insert '/x:html/x:body//x:section[@id="summary"]' --type elem --name section \
56+
--append '/x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-markdown --value "$${FILE}" \
57+
--append '/x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-separator --value "^---$$" \
58+
--append '/x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-vertical-separator --value "^--$$" \
59+
--insert '/x:html/x:body//x:section[@id="summary"]' --type text --name "" --value $$'\n' \
60+
$@; \
61+
done; \
62+
xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \
63+
--insert '/x:html/x:body//x:section[@id="summary"]' --type text --name "" --value $$'\n' \
64+
$@; \
65+
yq eval '.summary[] | "<li><span class=\"fa-li\"><i class=\"fa-duotone fa-" + .icon + "\"></i></span> " + .text + ")</li>"' $*.yaml \
66+
| while read -r LINE; do \
67+
xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \
68+
--subnode '/x:html/x:body//x:section[@id="summary"]/x:ul[@id="bullets"]' --type text --name "" --value "$${LINE}" \
69+
--subnode '/x:html/x:body//x:section[@id="summary"]/x:ul[@id="bullets"]' --type text --name "" --value $$'\n' \
70+
$@; \
71+
done; \
72+
yq eval '.events | reverse | .[] | .date + "<a href=\"" + .homepage + "\">" + .name + "</a>: <a href=\"" + .title + "\">" + .title + "</a>"' $*.yaml \
73+
| while read -r LINE; do \
74+
xmlstarlet ed --inplace -P -N x="http://www.w3.org/1999/xhtml" \
75+
--append '/x:html/x:body//x:section[@id="summary"]/x:h3[@id="events"]' --type text --name "" --value "$${LINE}" \
76+
--append '/x:html/x:body//x:section[@id="summary"]/x:h3[@id="events"]' --type text --name "" --value $$'\n' \
77+
$@; \
78+
done
5479

5580
.PHONY:
5681
web-$(COMMIT):

template.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ <h2>Summary</h2>
5656
<i class="fa-duotone fa-4x fa-lightbulb-on" style="float: right;"></i>
5757

5858
<ul id="bullets" class="fa-ul" style="line-height: 1.5em;">
59-
<li><span class="fa-li"><i class="fa-duotone fa-link"></i></span> First item</li>
60-
<li><span class="fa-li"><i class="fa-duotone fa-lock-keyhole"></i></span> Second item</li>
6159
</ul>
6260

6361
<h3 id="events">Upcoming events</h3>

0 commit comments

Comments
 (0)