summary refs log tree commit diff
path: root/www
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-10-03 20:45:53 -0400
committerJune McEnroe <june@causal.agency>2021-10-03 20:45:53 -0400
commit8cebe6bf306832bb1590d1f86cb41a56fc092493 (patch)
tree8432ea5b14e5ebbfb5d8d0cbccd00d8ca9dc1f78 /www
parentAdd Earthlings (diff)
downloadsrc-8cebe6bf306832bb1590d1f86cb41a56fc092493.tar.gz
src-8cebe6bf306832bb1590d1f86cb41a56fc092493.zip
Limit Atom feed to 20 most recent entries
20 is what everyone else seems to do. It's not too large putting
them all in right now, but it's infeasible to do forever.
Diffstat (limited to '')
-rw-r--r--www/text.causal.agency/feed.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/www/text.causal.agency/feed.sh b/www/text.causal.agency/feed.sh
index f45bd326..53964cfb 100644
--- a/www/text.causal.agency/feed.sh
+++ b/www/text.causal.agency/feed.sh
@@ -23,7 +23,9 @@ encode() {
 	' "$@"
 }
 
-for txt in *.txt; do
+set -- *.txt
+shift $(( $# - 20 ))
+for txt; do
 	entry="${txt%.txt}.7"
 	date=$(grep '^[.]Dd' "$entry" | cut -c 5-)
 	title=$(grep '^[.]Nm' "$entry" | cut -c 5- | encode)