Revert "Refactor work"

This reverts commit 9087f05a34.
This commit is contained in:
Atlas Cove 2023-02-17 17:54:30 +00:00
parent 9087f05a34
commit 22fac1e502
5 changed files with 13 additions and 19 deletions

View File

@ -16,7 +16,5 @@ clean:
rm -rf out
build:
./render.sh
sitemap: out/sitemap.xml
./gensimap.sh
push: build
rclone sync -v out/ neo:/

View File

@ -1,5 +1,6 @@
dnl extra macros for site structure
define(`_wrap',<$1>$2</$1>)dnl
define(`_a',<a href="$1">$2</a>)dnl
define(`_empty',`')dnl
define(`_ytv',`<iframe width="ifdef(`$3',$1,560)" height="ifdef(`$3',$3,315)" src="$1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')dnl
divert(-1)
# extra macros for site structure
define(`_ytv',`<iframe width="ifdef(`$3',$1,560)" height="ifdef(`$3',$3,315)" src="$1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')
define(`_wrap',<$1>$2</$1>)
define(`_empty',`')
divert dnl

View File

@ -1,2 +0,0 @@
define(`entr', `pushdef(`_LINK',$1)')dnl
entr(`/,Home')

View File

@ -1,11 +1,9 @@
dnl template.m4.html v2.0-p1
dnl Part of the tape-and-string suite used to construct the website
ifdef(`DEBUG',`traceon')dnl
# ifdef(`_INFILE',`dnl ',`errprint(`Macro _INFILE is not defined')
# m4exit(1)')dnl
include(`lib.m4')dnl
include(`linkdata.m4')dnl
define(`_la',`_a(`argn(`1',$1),argn(`2',$1)')
ifdef(`_INFILE',`dnl ',`errprint(`Macro _INFILE is not defined')
m4exit(1)')dnl
include(`m4/lib.m4')dnl
<!DOCTYPE html>
<html>
<head>
@ -16,11 +14,10 @@ define(`_la',`_a(`argn(`1',$1),argn(`2',$1)')
</head>
<body>
<div class="header">
stack_foreach(`_LINK',`_la')
<a href="/">Home</a>
</div>
<div class="content">
# esyscmd(`./tape.sh' _INFILE)dnl
esyscmd(`./tape.sh' _INFILE)
</div>
</body>
</html>

View File

@ -1,6 +1,6 @@
#!/bin/bash
# render.sh: part of the tape-and-string framework.
# v3.4-p2
# v3.4-p1
#B: Load
enable -f /usr/lib/bash/csv csv
declare -A title
@ -35,9 +35,9 @@ function docs {
o="${i/in/out}"
echo "$i => $o"
if test -z "${title[$i]}"; then
m4 -I m4 -D_INFILE="$i" -DCSSI=$(awk -f get_sd.awk <<< "$i") m4/main.html.m4 > ${o%.*}.html
m4 -D_INFILE="$i" -DCSSI=$(awk -f get_sd.awk <<< "$i") m4/main.html.m4 > ${o%.*}.html
else
m4 -I m4 -D_INFILE="$i" -DCSSI=$(awk -f get_sd.awk <<< "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > ${o%.*}.html
m4 -D_INFILE="$i" -DCSSI=$(awk -f get_sd.awk <<< "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > ${o%.*}.html
fi
done
}