site

bvnf.space sources
Log | Files | Refs

commit a017bd2937a236bc4833114eb94ad037f584e389
parent bff323478ba070f263ae5af7b9ea3061678ba1e7
Author: phoebos <ben@bvnf.space>
Date:   Fri, 30 Jun 2023 13:11:48 +0100

blog: actually fix gen-feed

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

diff --git a/blog/gen-feed.sh b/blog/gen-feed.sh @@ -21,7 +21,7 @@ ls -r -- *.txt *.gmi *.html | while read -r f; do unset date title desc link in # hack for same-day posts case "$f" in - 006*) time="01" ;; + 007*) time="01" ;; *) time="00" ;; esac case "$f" in @@ -30,19 +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")" + date="$(date -ju -f "%B %d, %Y" +"%a, %d %b %Y 00:00:${time:-00} %z" "$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="$(date -j +"%a, %d %b %Y 00:00:${time:-00} %z"-f "%B %d, %Y" "$(sed 1d "$f")")" + date="$(date -ju -f "%B %d, %Y" +"%a, %d %b %Y 00:00:${time:-00} %z" "$(sed 1d "$f")")" ;; *.html) link="$urlroot/$f" title="$(sed -n 's/.*<title>\(.*\)<\/title>.*/\1/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")")" + date="$(date -ju +"%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