ussg

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit c2e1425fa73befe59439e64eb787c790da71f738
parent 44a8b57602fbff9c1a01827950ebae5ee8468313
Author: Lightning <lightning@chatspeed.net>
Date:   Wed, 31 Dec 2025 11:08:13 +0000

umbrellix.cat version of compilesite as the example

Diffstat:
Mdoc/examples/compilesite.sh | 54++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 44 insertions(+), 10 deletions(-)

diff --git a/doc/examples/compilesite.sh b/doc/examples/compilesite.sh @@ -1,15 +1,49 @@ #!/bin/sh -#make html/style.css +mkdir -p html +make html/style.css j="" if test "$1" == "quick"; then j="${j} -Q"; fi -(cd src; find html -type f)|grep -E '\.(hmd|md)$'|sed -E 's/\.(hmd|md)$//g'|sort|uniq|while read i; do - if test ! -e src/$i.hmd; then - ussg-page $j -N -HM headers markdown src/$i.md $i.html - else - # prefer HMD if it exists - ussg-page $j -HM headers markdown src/$i.hmd $i.html - fi -done +#page-cp() { +# (cd src; find -L html -type f)|grep -E "\\.(h${1}|${1})$"|sed -E "s/\\.(h${1}|${1})$//g"|sort|uniq|while read i; do +# ussg-page $j -N -HM "headers.${1}" "$2" "src/$i.${1}" "$i.html" +# done +#} -tar -Chtml -cf - . | tar -C/opt/www/html -xvvf - +page-h() { + (cd src; find -L html -type f)|grep -E "\\.(h${1}|${1})$"|sed -E "s/\\.(h${1}|${1})$//g"|sort|uniq|while read i; do + if test ! -e "src/$i.h${1}"; then + ussg-page $j -N -HM "headers.${1}" "$2" "src/$i.${1}" "$i.html" + else + # prefer HMD if it exists + ussg-page $j -HM "headers.${1}" "$2" "src/$i.h${1}" "$i.html" + fi + done +} + +page-dh() { + (cd src; find -L html -type f)|grep -E "\\.(h${1}|${1})$"|sed -E "s/\\.(h${1}|${1})$//g"|sort|uniq|while read i; do + if test -e "src/$i.${1}.head"; then + # prefer to use detached headers + if test ! -e "src/$i.h${1}"; then + ussg-page $j -N -HHM "headers.${1}" "src/$i.man.head" "$2" "src/$i.${1}" "$i.html" + else + # prefer HMD if it exists + ussg-page $j -HHM "headers.${1}" "src/$i.man.head" "$2" "src/$i.h${1}" "$i.html" + fi + else + if test ! -e src/$i.hman; then + ussg-page $j -N -HM "headers.${1}" "$2" "src/$i.${1}" "$i.html" + else + # prefer HMD if it exists + ussg-page $j -HM "headers.${1}" "$2" "src/$i.h${1}" "$i.html" + fi + fi + done +} + +page-h md "${MARKDOWN:-/Users/ellenor/.unuopaj/hbsd14/discount/bin/markdown}" +#page-dh man "mandoc -T html -O fragment" +[ -d html-pure ] && tar -Chtml-pure -cf - .|tar -Chtml -xf - + +#tar -Chtml -cf - . | tar -C/opt/www/html -xvvf -