diff options
author | June McEnroe <june@causal.agency> | 2024-03-24 20:32:50 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2024-03-24 20:32:50 -0400 |
commit | 65281150bd81f60f29b971a2261f9dafd5f11ebf (patch) | |
tree | 509b496e1162b7cd7845cdfc65cee0146a4d61e2 /www/text.causal.agency | |
parent | Publish "comfort music" (diff) | |
download | src-65281150bd81f60f29b971a2261f9dafd5f11ebf.tar.gz src-65281150bd81f60f29b971a2261f9dafd5f11ebf.zip |
Add support for text files to just be fmt'ed
Diffstat (limited to '')
-rw-r--r-- | www/text.causal.agency/Makefile | 6 | ||||
-rw-r--r-- | www/text.causal.agency/feed.sh | 1 |
2 files changed, 6 insertions, 1 deletions
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) |