implemented link templating, finally.
This commit is contained in:
parent
22fac1e502
commit
f6f49aa315
2
awk/getlinks.awk
Normal file
2
awk/getlinks.awk
Normal file
@ -0,0 +1,2 @@
|
||||
BEGIN{FS=","}
|
||||
{print "<a href=\"" $1 "\">" $2 "</a>"}
|
1
dat/links.csv
Normal file
1
dat/links.csv
Normal file
@ -0,0 +1 @@
|
||||
/,Home
|
|
@ -14,7 +14,7 @@ include(`m4/lib.m4')dnl
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="/">Home</a>
|
||||
esyscmd(`awk -f awk/getlinks.awk dat/links.csv')dnl
|
||||
</div>
|
||||
<div class="content">
|
||||
esyscmd(`./tape.sh' _INFILE)
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/ruby
|
||||
# pfiles.rb
|
||||
# v1.0-p2
|
||||
# v1.0-p3
|
||||
require 'find'
|
||||
ignore=!File.file?('ignore.txt') ? [] : File.readlines('ignore.txt')
|
||||
ignore=!File.file?('dat/ignore.txt') ? [] : File.readlines('dat/ignore.txt')
|
||||
if ignore != []
|
||||
ignore.map! do |i|
|
||||
"in/#{i}"
|
||||
|
12
render.sh
12
render.sh
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# render.sh: part of the tape-and-string framework.
|
||||
# v3.4-p1
|
||||
# v3.4-p2
|
||||
#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 -D_INFILE="$i" -DCSSI=$(awk -f get_sd.awk <<< "$i") m4/main.html.m4 > ${o%.*}.html
|
||||
m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") m4/main.html.m4 > ${o%.*}.html
|
||||
else
|
||||
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 awk/getsd.awk <<< "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > ${o%.*}.html
|
||||
fi
|
||||
done
|
||||
}
|
||||
@ -57,7 +57,7 @@ function sass {
|
||||
o="${i/in/out}"
|
||||
o="${o/.s[ac]/.c}"
|
||||
echo "$i => $o"
|
||||
sassc -t expanded -a $i | sed 'g/^$/d' > $o
|
||||
sassc -t expanded -a $i | sed '/^$/d' > $o
|
||||
done
|
||||
fi
|
||||
}
|
||||
@ -97,14 +97,14 @@ function info {
|
||||
while read -r ii; do
|
||||
csv -a i "$ii"
|
||||
title[in/${i[0]}]=${i[1]}
|
||||
done < title.csv
|
||||
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
|
||||
ignore+=(in/$i)
|
||||
done < ignore.txt
|
||||
done < dat/ignore.txt
|
||||
fi
|
||||
#E: Logic/LoadDefs/ignore
|
||||
#E: Logic/LoadDefs
|
||||
|
Loading…
Reference in New Issue
Block a user