wowana.me

website source


commit b0945b1074ef6124d8f2b2f64826c05da05a4112
parent 11c27b5edfba9bd379d8c233c60521e38d0ba246
Author: opal hart <opal@wowana.me>
Date:   Sun, 11 Aug 2019 06:41:11 +0000

generate content under https://wowana.me/git/

Diffstat:
MMakefile | 3+++
Ascripts/gitindex.sh | 16++++++++++++++++
Asrc/git.inc | 16++++++++++++++++
Msrc/header.inc | 1+
4 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -7,6 +7,8 @@ FINAL := $(OBJ:src/%.part.xht=out/%.xht) out/blog/index.xht out/blog/feed.atom .INTERMEDIATE: $(OBJ) all: $(FINAL) + ./scripts/gitindex.sh + rm -f ./src/git.part.xht check: $(FINAL) xmllint --nonet --noout $^ @@ -18,6 +20,7 @@ clean: upload: rsync -Pprtuvz --exclude-from=rsync-ignore --delete out/ mimiga:www/wowana.me/ rsync -Pprtuvz --delete /mnt/alpine/home/alpine/packages/ mimiga:www/wowana.me/alpine/ + rsync -Pprtuvz out/git/ mimiga:/var/lib/git/ src/%.part.xht: src/%.md markdown < $< > $@ diff --git a/scripts/gitindex.sh b/scripts/gitindex.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +repos="$(ssh mimiga find /var/lib/git -type d -name '*.git' -maxdepth 1)" + +for repopath in $repos; do + repo="$(basename "$repopath" .git)" + mkdir -p "out/git/$repo.git" + markdown <src/git.inc >src/git.part.xht + scripts/postproc.sh src/git.part.xht | + sed "s/%reponame%/$repo/g" >"out/git/$repo.git/index.xht" +done + +printf %s "$repos" | sed 's@^.*/\([^/]*\)$@- [\1](/git/\1)@; 1i # git\n' | + markdown > src/git-index.md.tmp +scripts/postproc.sh src/git-index.md.tmp >out/git/index.xht +rm src/git-index.md.tmp diff --git a/src/git.inc b/src/git.inc @@ -0,0 +1,16 @@ +# %reponame% + +this address is meant for use with `git` and has no web-facing content +other than this informational landing page. you may clone the URL in +your address bar to your local workspace in order to view the +repository. + +please refer to the licensing terms within the repository for copyright +information. + +## permalinks + +- `git clone https://wowana.me/git/%reponame%.git` +- `git clone http://opalrwf4mzmlfmag.onion/git/%reponame%.git` +- `git clone http://opal.i2p/git/%reponame%.git` +- `git clone http://opal.ano/git/%reponame%.git` diff --git a/src/header.inc b/src/header.inc @@ -18,6 +18,7 @@ <li><a href="/blog/">blog</a></li> <li><a href="/contact.xht">contact</a></li> <li><a href="/donate.xht">donate</a></li> + <li><a href="/git/">git</a></li> <li><a href="/pgp.xht">PGP</a></li> <li><a href="/files/">files</a></li> <li><a href="/permalink.xht">permalink</a></li>