site

bvnf.space sources
Log | Files | Refs

commit d8472a48e72b3a118b90b594700a36d42bd3657d
parent 76ebfc74605aaff4efe421db9d6e813546bfe7cc
Author: phoebos <ben@bvnf.space>
Date:   Fri, 30 Jun 2023 12:46:13 +0100

blog: fix gen-feed

Diffstat:
Mblog/gen-feed.sh | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/blog/gen-feed.sh b/blog/gen-feed.sh @@ -30,18 +30,19 @@ ls -r -- *.txt *.gmi *.html | while read -r f; do link="$urlroot/$f" in="${f%.txt}.7" date="$(grep '^[.]Dd' "$in" | cut -c 5-)" + date="$(date -j +"%a, %d %b %Y 00:00:${time:-00} %z"-f "%B %d, %Y" "$date")" title="$(grep '^[.]Nm' "$in" | cut -c 5-)" desc=" - $(grep '^[.]Nd' "$in" | cut -c 5-)" ;; *.gmi) link="gemini://gemini.bvnf.space/blog/${f#[0-9][0-9][0-9]-}" title="$(sed 1q "$f")" - date="$(sed 1d "$f")" + date="$(date -j +"%a, %d %b %Y 00:00:${time:-00} %z"-f "%B %d, %Y" "$(sed 1d "$f")")" ;; *.html) link="$urlroot/$f" title="$(sed -n 's/.*<title>\(.*\)<\/title>.*/\1/p' "$f")" - date="$(date -j +"%B %d, %Y" "$(sed -n 's/^.*written \([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\).*$/\1\2\30000/p' "$f")")" + date="$(date -j +"%a, %d %b %Y 00:00:${time:-00} %z" "$(sed -n 's/^.*written \([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\).*$/\1\2\30000/p' "$f")")" ;; *) continue ;; esac @@ -51,7 +52,7 @@ ls -r -- *.txt *.gmi *.html | while read -r f; do <item> <title>$title</title> <link>$link</link> - <pubDate>$(date -ju "$date" "+%a, %d %b %Y 00:00:${time:-00} %z")</pubDate> + <pubDate>$date</pubDate> </item> EOF