diff options
| author | Laird Lonergan <sillyfanboy@gmail.com> | 2026-09-03 01:40:19 +0000 |
|---|---|---|
| committer | Laird Lonergan <sillyfanboy@gmail.com> | 2026-09-03 01:40:19 +0000 |
| commit | 43ed72ae3cd7e5f17aeb3b51000fa69614495b1e (patch) | |
| tree | 2441b172d5ca92b87bbbb6a6810fc6f224484357 /mirror.rc | |
| parent | initial (diff) | |
| download | www-front.tar.gz www-front.zip | |
Reads the blog's RSS feed (full post body lives in content:encoded) and
writes flat mothra-friendly HTML under html/ — an index plus one page per
post at YYYY/MM/DD/slug.html.
Plain ANSI C so it builds with APE pcc on 9front and cc elsewhere; fetches
with hget when present, curl otherwise. mirror.rc regenerates and pushes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAgU4WFfVJKNK8CkpxhEcg
Diffstat (limited to 'mirror.rc')
| -rwxr-xr-x | mirror.rc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mirror.rc b/mirror.rc new file mode 100755 index 0000000..8d1b106 --- /dev/null +++ b/mirror.rc @@ -0,0 +1,22 @@ +#!/bin/rc +# Refresh the blog mirror in html/ and push it. Run from the repo root. +rfork en + +if(! test -x ./blogmirror){ + echo 'build first: mk' >[1=2] + exit 'nobinary' +} + +git/fs >[2]/dev/null # harmless if already running + +./blogmirror -o html || exit 'mirror' + +files=`{walk -f html} +if(~ $#files 0) + exit 'nothing mirrored' + +git/add $files +if(git/commit -m 'mirror blog.sillylaird.ca' $files) + git/push +if not + echo 'no changes' >[1=2] |
