ADDED:
* tplx/sprigx
This commit is contained in:
brent saner
2026-01-24 13:41:54 -05:00
parent 2edbc9306d
commit 927ad08057
17 changed files with 3449 additions and 1 deletions

31
.githooks/pre-commit/01-docgen Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
orig="${PWD}"
if ! command -v asciidoctor &> /dev/null;
then
exit 0
fi
set -e
for f in $(find . -type f -iname "README.adoc"); do
filename=$(basename -- "${f}")
docsdir=$(dirname -- "${f}")
nosuffix="${filename%.*}"
pfx="${docsdir}/${nosuffix}"
newf="${pfx}.html"
asciidoctor -a ROOTDIR="${orig}/" -o "${newf}" "${f}"
echo "Generated ${newf} from ${f}"
git add "${newf}"
if command -v pandoc &> /dev/null;
then
newf="${pfx}.md"
asciidoctor -a ROOTDIR="${orig}/" -b docbook -o - "${f}" | pandoc -f docbook -t markdown_strict -o "${newf}"
echo "Generated ${newf} from ${f}"
git add "${newf}"
fi
cd ${orig}
done
echo "Regenerated docs"