From 65281150bd81f60f29b971a2261f9dafd5f11ebf Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 24 Mar 2024 20:32:50 -0400 Subject: Add support for text files to just be fmt'ed --- www/text.causal.agency/Makefile | 6 +++++- www/text.causal.agency/feed.sh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/www/text.causal.agency/Makefile b/www/text.causal.agency/Makefile index a799cce2..44ce676c 100644 --- a/www/text.causal.agency/Makefile +++ b/www/text.causal.agency/Makefile @@ -45,12 +45,16 @@ TXTS += 042-comfort-music.txt all: colb ${TXTS} -.SUFFIXES: .7 .txt +.SUFFIXES: .7 .fmt .txt .7.txt: mandoc -T utf8 $< | ./colb > $@ touch -m -r $< $@ +.fmt.txt: + fmt $< | sed '1,/^$$/d' > $@ + touch -m -r $< $@ + feed.atom: feed.sh colb ${TXTS} sh feed.sh > feed.atom diff --git a/www/text.causal.agency/feed.sh b/www/text.causal.agency/feed.sh index 668046ef..71bbf662 100644 --- a/www/text.causal.agency/feed.sh +++ b/www/text.causal.agency/feed.sh @@ -27,6 +27,7 @@ set -- *.txt shift $(( $# - 20 )) for txt; do entry="${txt%.txt}.7" + test -f "$entry" || entry="${txt%.txt}.fmt" date=$(grep '^[.]Dd' "$entry" | cut -c 5-) title=$(grep -m 1 '^[.]Nm' "$entry" | cut -c 5- | encode) summary=$(grep '^[.]Nd' "$entry" | cut -c 5- | encode) -- cgit 1.4.1