engine work
This commit is contained in:
parent
5f3aff6184
commit
b65e02d9ee
4
get_sd.awk
Normal file
4
get_sd.awk
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/awk
|
||||
BEGIN{FS="/";x=2}
|
||||
/\.\//{x++}
|
||||
{gsub($0,"./","");print $x;exit}
|
@ -1,20 +1,21 @@
|
||||
dnl template.m4.html v1.3-p1
|
||||
dnl Part of the tape-and-string suite used to construct the website
|
||||
include(`m4/lib.m4')dnl
|
||||
ifdef(`CSS_INC',`', define(`CSS_INC', `main'))dnl
|
||||
ifelse(CSS_INC,`dnd',define(`CSS_INC',`dnd'))dnl
|
||||
define(`_CSS',`/css/CSS_INC.css')dnl
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
@import url("/css/main.css");
|
||||
@import url("_CSS");
|
||||
</style>
|
||||
<title>TITLE</title>
|
||||
</head>
|
||||
<body>
|
||||
<hr />
|
||||
<div class="header">
|
||||
<a href="/">Home</a>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="content">
|
||||
include(`/dev/stdin')dnl Probably not a good idea, but whatever.
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# render.sh: part of the tape-and-string framework.
|
||||
# v3.2-p1
|
||||
# v3.3-p1
|
||||
#B: Load
|
||||
enable -f /usr/lib/bash/csv csv
|
||||
declare -A title
|
||||
@ -56,9 +56,9 @@ function docs {
|
||||
o="${i/in/out}"
|
||||
echo "$i => $o"
|
||||
if test -z "${title[$i]}"; then
|
||||
tape $i | m4 m4/main.html.m4 > ${o%.*}.html
|
||||
tape $i | m4 -DCSS_INC=$(awk -f get_sd.awk "$i") m4/main.html.m4 > ${o%.*}.html
|
||||
else
|
||||
tape $i | m4 -DTITLE="${title[$i]}" m4/main.html.m4 > ${o%.*}.html
|
||||
tape $i | m4 -DCSS_INC=$(awk -f get_sd.awk "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > ${o%.*}.html
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user