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 template.m4.html v1.3-p1
|
||||||
dnl Part of the tape-and-string suite used to construct the website
|
dnl Part of the tape-and-string suite used to construct the website
|
||||||
include(`m4/lib.m4')dnl
|
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>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<style>
|
<style>
|
||||||
@import url("/css/main.css");
|
@import url("_CSS");
|
||||||
</style>
|
</style>
|
||||||
<title>TITLE</title>
|
<title>TITLE</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<hr />
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<a href="/">Home</a>
|
<a href="/">Home</a>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
include(`/dev/stdin')dnl Probably not a good idea, but whatever.
|
include(`/dev/stdin')dnl Probably not a good idea, but whatever.
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# render.sh: part of the tape-and-string framework.
|
# render.sh: part of the tape-and-string framework.
|
||||||
# v3.2-p1
|
# v3.3-p1
|
||||||
#B: Load
|
#B: Load
|
||||||
enable -f /usr/lib/bash/csv csv
|
enable -f /usr/lib/bash/csv csv
|
||||||
declare -A title
|
declare -A title
|
||||||
@ -56,9 +56,9 @@ function docs {
|
|||||||
o="${i/in/out}"
|
o="${i/in/out}"
|
||||||
echo "$i => $o"
|
echo "$i => $o"
|
||||||
if test -z "${title[$i]}"; then
|
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
|
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
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user