logroll updates
All checks were successful
ci/woodpecker/push/build-deploy Pipeline was successful

This commit is contained in:
41666 2025-05-16 21:52:45 -07:00
parent 83947f2dec
commit 78ecc94d58
2 changed files with 40 additions and 5 deletions

View file

@ -119,7 +119,9 @@ description: how it stores secrets alongside its code
age answers that question by letting doll use ed25519 keys to encrypt and decrypt doll's data.
[quote(important ^noe message):ed25519 would be a good name for a doll!!]
[quote(important ^noe message)::
ed25519 would be a good name for a doll!!
]
since we're deploying to machines with presumably an SSH server running, and presumably
the doll also has an SSH client, all of these ends have SSH keys we can use

View file

@ -1,15 +1,48 @@
#!/bin/bash
cd log
get_frontmatter() {
key=$1
file=$2
keyLine=$(grep -e "^$key: " $file || echo "")
sed "s/.*: //" <<<$keyLine | xargs
}
get_heading() {
file=$1
grep -i '^&' $file
}
get_heading_date() {
echo $1 | sed -E 's/^.*\(([A-Z0-9]+)\) \^.*$/\1/g'
}
get_heading_name() {
echo $1 | sed -E 's/^.*\] (.*) \(.*$/\1/g'
}
get_author() {
code=$(echo $1 | sed -E 's/.*\^(.*)$/\1/g')
echo $code
}
echo "<ul>"
files=$(ls ???-*.doll)
for file in $files; do
title=$(get_frontmatter title $file)
description=$(get_frontmatter description $file)
link=${file//.doll/.html}
heading=$(get_heading $file)
heading_name=$(get_heading_name "$heading")
heading_date=$(get_heading_date "$heading")
author=$(get_author "$heading")
echo "<li>"
echo "<a href=\"${file//.doll/.html}\">${file//.doll/}</a>"
echo "<a href=\"$link\">$dollcode <b>$heading_name</b></a></br>&nbsp;&nbsp;<i>$description</i>"
echo "</li>"
done