From 178d7d9d455e9f6a89a94f19a384993a5769584b Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 12 Jul 2019 22:11:16 -0400 Subject: Move to www/text.causal.agency --- www/text.causal.agency/feed.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 www/text.causal.agency/feed.sh (limited to 'www/text.causal.agency/feed.sh') diff --git a/www/text.causal.agency/feed.sh b/www/text.causal.agency/feed.sh new file mode 100755 index 00000000..3c6e6589 --- /dev/null +++ b/www/text.causal.agency/feed.sh @@ -0,0 +1,29 @@ +#!/bin/sh +set -e -u + +updated=$(date -u '+%FT%TZ') +cat < + +Causal Agency +Junejune@causal.agency + +https://text.causal.agency/ +${updated} +EOF +for entry in *.7; do + url="https://text.causal.agency/${entry%.7}.txt" + title=$(grep '^\.Nm' "$entry" | cut -c 5-) + summary=$(grep '^\.Nd' "$entry" | cut -c 5-) + updated=$(date -j -u -f '%s' "$(stat -f '%m' "$entry")" '+%FT%TZ') + cat < + ${title} + ${summary} + + ${url} + ${updated} + +EOF +done +echo '' -- cgit 1.4.1