Merge branch 'tech'
This commit is contained in:
commit
2741ebcc3b
@ -3,4 +3,4 @@ divert(-1)
|
||||
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
|
||||
divert`'dnl
|
||||
|
@ -1,14 +1,14 @@
|
||||
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
|
||||
ifdef(`_INFILE',`dnl',`errprint(`Macro _INFILE is not defined')m4exit(1)')
|
||||
ifdef(`TITLE',`dnl',`define(`TITLE',`Atlas48 Archives')dnl)')
|
||||
include(`m4/lib.m4')dnl
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
@import url("/css/CSSI().css'");
|
||||
@import url("/css/CSSI().css");
|
||||
</style>
|
||||
<title>TITLE</title>
|
||||
</head>
|
||||
|
25
render.sh
25
render.sh
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# render.sh: part of the tape-and-string framework.
|
||||
# v3.4-p3
|
||||
# v3.4-p5
|
||||
#B: Load
|
||||
enable -f /usr/lib/bash/csv csv
|
||||
declare -A title
|
||||
@ -24,6 +24,7 @@ function dirs {
|
||||
done
|
||||
}
|
||||
function docs {
|
||||
load_title
|
||||
if ! test -d out; then
|
||||
err "Cannot render, directory 'out' does not exist, run ./render.sh dir"
|
||||
return 1
|
||||
@ -33,11 +34,12 @@ function docs {
|
||||
inf "Rendering document files..."
|
||||
for i in ${doc[@]}; do
|
||||
o="${i/in/out}"
|
||||
o="${o%.*}.html"
|
||||
echo "'$i' -> '$o'"
|
||||
if test -z "${title[$i]}"; then
|
||||
m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") m4/main.html.m4 > ${o%.*}.html
|
||||
m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") m4/main.html.m4 > $o
|
||||
else
|
||||
m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > ${o%.*}.html
|
||||
m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > $o
|
||||
fi
|
||||
done
|
||||
}
|
||||
@ -70,12 +72,14 @@ function other {
|
||||
cp -rv 'in'/* out/
|
||||
}
|
||||
function all {
|
||||
load_title
|
||||
dirs
|
||||
docs
|
||||
sass
|
||||
other
|
||||
}
|
||||
function info {
|
||||
load_title
|
||||
local i
|
||||
echo "* \$ignore"
|
||||
if [ ${#ignore[@]} -eq 0 ]; then
|
||||
@ -90,16 +94,16 @@ function info {
|
||||
echo " - $i :: ${title[$i]}"
|
||||
done
|
||||
}
|
||||
function load_title {
|
||||
local ii
|
||||
while read -r ii; do
|
||||
csv -a i "$ii"
|
||||
title[in/${i[0]}]=${i[1]}
|
||||
done < dat/title.csv
|
||||
}
|
||||
#E: Definition
|
||||
#B: Logic
|
||||
#B: Logic/LoadDefs
|
||||
#B: Logic/LoadDefs/title
|
||||
while read -r ii; do
|
||||
csv -a i "$ii"
|
||||
title[in/${i[0]}]=${i[1]}
|
||||
done < dat/title.csv
|
||||
#E: Logic/LoadDefs/title
|
||||
unset ii
|
||||
#B: Logic/LoadDefs/ignore
|
||||
if test -f ignore.txt; then
|
||||
while read -r i; do
|
||||
@ -115,6 +119,7 @@ fi
|
||||
case $1 in
|
||||
dir) dirs;;
|
||||
doc) docs;;
|
||||
docs) docs;;
|
||||
s[ac]ss) sass;;
|
||||
other) other;;
|
||||
rest) other;;
|
||||
|
Loading…
Reference in New Issue
Block a user