From 53a7024dc41a8750ceb15071b053ea67d48ff496 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 9 Oct 2024 23:03:07 +0200 Subject: Some feed.xml fixes --- build.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- feed-top.xml | 4 +++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 73bce36..c08f9a6 100755 --- a/build.sh +++ b/build.sh @@ -61,6 +61,7 @@ makeblogindexandfeed() { f="src/blog/$i/*.md" d="$(echo "$i" | grep -oE '^[0-9]{4}-[0-9]{2}-[0-9]{2}')" t="$(head -n 1 $f | sed 's/# //')" + link="https://sebastiano.tronto.net/blog/$i" thisyear="$(echo "$d" | sed 's/-.*//')" if [ "$thisyear" != "$lastyear" ]; then @@ -71,11 +72,15 @@ makeblogindexandfeed() { { echo "$d"; echo "$t"; } >> "$bf" + dd="$(echo "$d" | sed 's/.*-//')" + mm="$(echo "$d" | sed 's/....-//' | sed 's/-.*//')" + mon="$(month "$mm")" { echo ""; echo "$t"; - echo "https://sebastiano.tronto.net/blog/$i"; + echo "$link"; + echo "$link"; echo "$t"; - echo "$d"; + echo "$dd $mon $thisyear 00:00:00 GMT"; echo ""; echo ""; } >> $ff done @@ -86,5 +91,46 @@ makeblogindexandfeed() { { echo ""; echo ""; echo ""; } >> "$ff" } +month() { + case "$1" in + 01) + echo "Jan" + ;; + 02) + echo "Feb" + ;; + 03) + echo "Mar" + ;; + 04) + echo "Apr" + ;; + 05) + echo "May" + ;; + 06) + echo "Jun" + ;; + 07) + echo "Jul" + ;; + 08) + echo "Aug" + ;; + 09) + echo "Sep" + ;; + 10) + echo "Oct" + ;; + 11) + echo "Nov" + ;; + 12) + echo "Dec" + ;; + esac +} + makeblogindexandfeed recursivebuild src diff --git a/feed-top.xml b/feed-top.xml index b4e2251..d320048 100644 --- a/feed-top.xml +++ b/feed-top.xml @@ -1,9 +1,11 @@ - + Sebastiano Tronto's blog https://sebastiano.tronto.net/blog + Thoughts about software, computers and whatever I feel like sharing -- cgit v1.3